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

Method append

Lib/xml/etree/ElementTree.py:222–231  ·  view source on GitHub ↗

Add *subelement* to the end of this element. The new element will appear in document order after the last existing subelement (or directly after the text, if it's the first subelement), but before the end tag for this element.

(self, subelement)

Source from the content-addressed store, hash-verified

220 del self._children[index]
221
222 def append(self, subelement):
223 """Add *subelement* to the end of this element.
224
225 The new element will appear in document order after the last existing
226 subelement (or directly after the text, if it's the first subelement),
227 but before the end tag for this element.
228
229 """
230 self._assert_is_element(subelement)
231 self._children.append(subelement)
232
233 def extend(self, elements):
234 """Append subelements from a sequence.

Callers 15

test_simpleopsMethod · 0.95
test_makeelementMethod · 0.95
test_qnameMethod · 0.95
test_lost_tailMethod · 0.95
test_lost_elemMethod · 0.95
test___copy__Method · 0.95
test___deepcopy__Method · 0.95
test_cyclic_gcMethod · 0.95
test_pickleMethod · 0.95
write_junitMethod · 0.95

Calls 1

_assert_is_elementMethod · 0.95

Tested by 11

test_simpleopsMethod · 0.76
test_makeelementMethod · 0.76
test_qnameMethod · 0.76
test_lost_tailMethod · 0.76
test_lost_elemMethod · 0.76
test___copy__Method · 0.76
test___deepcopy__Method · 0.76
test_cyclic_gcMethod · 0.76
test_pickleMethod · 0.76