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

Method pi

Lib/xml/etree/ElementTree.py:1503–1510  ·  view source on GitHub ↗

Create a processing instruction using the pi_factory. *target* is the target name of the processing instruction. *text* is the data of the processing instruction, or ''.

(self, target, text=None)

Source from the content-addressed store, hash-verified

1501 self._comment_factory, self.insert_comments, text)
1502
1503 def pi(self, target, text=None):
1504 """Create a processing instruction using the pi_factory.
1505
1506 *target* is the target name of the processing instruction.
1507 *text* is the data of the processing instruction, or ''.
1508 """
1509 return self._handle_single(
1510 self._pi_factory, self.insert_pis, target, text)
1511
1512 def _handle_single(self, factory, insert, *args):
1513 elem = factory(*args)

Callers 2

test_treebuilder_piMethod · 0.95
handlerMethod · 0.45

Calls 1

_handle_singleMethod · 0.95

Tested by 1

test_treebuilder_piMethod · 0.76