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

Method _flush

Lib/xml/etree/ElementTree.py:1448–1458  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1446 return self._root
1447
1448 def _flush(self):
1449 if self._data:
1450 if self._last is not None:
1451 text = "".join(self._data)
1452 if self._tail:
1453 assert self._last.tail is None, "internal error (tail)"
1454 self._last.tail = text
1455 else:
1456 assert self._last.text is None, "internal error (text)"
1457 self._last.text = text
1458 self._data = []
1459
1460 def data(self, data):
1461 """Add text to current element."""

Callers 4

startMethod · 0.95
endMethod · 0.95
_handle_singleMethod · 0.95
endDocumentMethod · 0.45

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected