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

Method insert

Lib/xml/etree/ElementTree.py:243–246  ·  view source on GitHub ↗

Insert *subelement* at position *index*.

(self, index, subelement)

Source from the content-addressed store, hash-verified

241 self._children.append(element)
242
243 def insert(self, index, subelement):
244 """Insert *subelement* at position *index*."""
245 self._assert_is_element(subelement)
246 self._children.insert(index, subelement)
247
248 def _assert_is_element(self, e):
249 # Need to refer to the actual Python implementation, not the

Callers 5

test_simpleopsMethod · 0.95
test_writefileMethod · 0.95
insertBeforeMethod · 0.45
_get_wholeTextMethod · 0.45

Calls 1

_assert_is_elementMethod · 0.95

Tested by 3

test_simpleopsMethod · 0.76
test_writefileMethod · 0.76