(self, match)
return Tag(
            block_type_name=block_type_name,
            block_name=block_name,
            start=start_pos,
            end=self.pos
        )
The tag could be one of a few things:

            {% mytag %}
            {% mytag x = y %}
            {% mytag x = "y" %}
            {% mytag x.y() %}
            {% mytag foo("a", "b", c="d") %}

        But the key here is that it's always going to be `{% mytag`!
The tag could be one of a few things:
The tag could be one of a few things :
def handle_tag(self, match):
        """The tag could be one of a few things:

            {% mytag %}
            {% mytag x = y %}
            {% mytag x = "y" %}
            {% mytag x.y() %}
            {% mytag foo("a", "b", c="d") %}

        But the key here is that it's always going to be `{% mytag`!
        """
        groups = match.groupdict()
        # always a value
        block_type_name = groups['block_type_name']
        # might be None
        block_name = groups.get('block_name')
        start_pos = self.pos
        if block_type_name == 'raw':
            match = self._expect_match('{% raw %}...{% endraw %}',
                                       RAW_BLOCK_PATTERN)
            self.advance(match.end())
        else:
            self.advance(match.end())
            self._expect_block_close()
        return Tag(
            block_type_name=block_type_name,
            block_name=block_name,
            start=start_pos,
            end=self.pos
        )
def handle_tag ( self , match ) : groups = match . groupdict ( ) # always a value block_type_name = groups [ 'block_type_name' ] # might be None block_name = groups . get ( 'block_name' ) start_pos = self . pos if block_type_name == 'raw' : match = self . _expect_match ( '{% raw %}...{% endraw %}' , RAW_BLOCK_PATTERN ) self . advance ( match . end ( ) ) else : self . advance ( match . end ( ) ) self . _expect_block_close ( ) return Tag ( block_type_name = block_type_name , block_name = block_name , start = start_pos , end = self . pos )