(self, tag)
return self._last
Close and return current Element.

        *tag* is the element name.
Close and return current Element.
Close and return current Element .
def end(self, tag):
        """Close and return current Element.

        *tag* is the element name.

        """
        self._flush()
        self._last = self._elem.pop()
        assert self._last.tag == tag,\
               "end tag mismatch (expected %s, got %s)" % (
                   self._last.tag, tag)
        self._tail = 1
        return self._last
def end ( self , tag ) : self . _flush ( ) self . _last = self . _elem . pop ( ) assert self . _last . tag == tag , "end tag mismatch (expected %s, got %s)" % ( self . _last . tag , tag ) self . _tail = 1 return self . _last