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

Method pi

Lib/xml/etree/ElementTree.py:2039–2049  ·  view source on GitHub ↗
(self, target, data)

Source from the content-addressed store, hash-verified

2037 self._write('\n')
2038
2039 def pi(self, target, data):
2040 if self._ignored_depth:
2041 return
2042 if self._root_done:
2043 self._write('\n')
2044 elif self._root_seen and self._data:
2045 self._flush()
2046 self._write(
2047 f'<?{target} {_escape_cdata_c14n(data)}?>' if data else f'<?{target}?>')
2048 if not self._root_seen:
2049 self._write('\n')
2050
2051
2052def _escape_cdata_c14n(text):

Callers

nothing calls this directly

Calls 3

_flushMethod · 0.95
_escape_cdata_c14nFunction · 0.85
_writeMethod · 0.45

Tested by

no test coverage detected