MCPcopy Index your code
hub / github.com/RustPython/RustPython / start

Method start

Lib/xml/etree/ElementTree.py:1460–1475  ·  view source on GitHub ↗

Open new element and return it. *tag* is the element name, *attrs* is a dict containing element attributes.

(self, tag, attrs)

Source from the content-addressed store, hash-verified

1458 self._data.append(data)
1459
1460 def start(self, tag, attrs):
1461 """Open new element and return it.
1462
1463 *tag* is the element name, *attrs* is a dict containing element
1464 attributes.
1465
1466 """
1467 self._flush()
1468 self._last = elem = self._factory(tag, attrs)
1469 if self._elem:
1470 self._elem[-1].append(elem)
1471 elif self._root is None:
1472 self._root = elem
1473 self._elem.append(elem)
1474 self._tail = 0
1475 return elem
1476
1477 def end(self, tag):
1478 """Close and return current Element.

Callers 7

xmltoolkit63Method · 0.95
test_bug_1534630Method · 0.95
test_element_get_textMethod · 0.95
test_element_get_tailMethod · 0.95
test_treebuilder_endMethod · 0.95
_startMethod · 0.45

Calls 3

_flushMethod · 0.95
_factoryMethod · 0.80
appendMethod · 0.45

Tested by 6

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