MCPcopy Index your code
hub / github.com/python/cpython / end

Method end

Lib/xml/etree/ElementTree.py:1481–1493  ·  view source on GitHub ↗

Close and return current Element. *tag* is the element name.

(self, tag)

Source from the content-addressed store, hash-verified

1479 return elem
1480
1481 def end(self, tag):
1482 """Close and return current Element.
1483
1484 *tag* is the element name.
1485
1486 """
1487 self._flush()
1488 self._last = self._elem.pop()
1489 assert self._last.tag == tag,\
1490 "end tag mismatch (expected %s, got %s)" % (
1491 self._last.tag, tag)
1492 self._tail = 1
1493 return self._last
1494
1495 def comment(self, text):
1496 """Create a comment using the comment_factory.

Callers 5

xmltoolkit63Method · 0.95
test_bug_1534630Method · 0.95
test_element_get_textMethod · 0.95
test_element_get_tailMethod · 0.95
_endMethod · 0.45

Calls 2

_flushMethod · 0.95
popMethod · 0.45

Tested by 4

xmltoolkit63Method · 0.76
test_bug_1534630Method · 0.76
test_element_get_textMethod · 0.76
test_element_get_tailMethod · 0.76