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

Method start

Lib/xml/etree/ElementTree.py:1464–1479  ·  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

1462 self._data.append(data)
1463
1464 def start(self, tag, attrs):
1465 """Open new element and return it.
1466
1467 *tag* is the element name, *attrs* is a dict containing element
1468 attributes.
1469
1470 """
1471 self._flush()
1472 self._last = elem = self._factory(tag, attrs)
1473 if self._elem:
1474 self._elem[-1].append(elem)
1475 elif self._root is None:
1476 self._root = elem
1477 self._elem.append(elem)
1478 self._tail = 0
1479 return elem
1480
1481 def end(self, tag):
1482 """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