8000 Documentation: XML Element - pi objects instead of comment objects by christopheNan · Pull Request #108848 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Documentation: XML Element - pi objects instead of comment objects #108848

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 1, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Doc/library/xml.etree.elementtree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ Functions
given. Returns an element instance, representing a processing instruction.

Note that :class:`XMLParser` skips over processing instructions
in the input instead of creating comment objects for them. An
in the input instead of creating pi objects for them. An
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it clear? Maybe use "processing instruction objects"?

:class:`ElementTree` will only contain processing instruction nodes if
they have been inserted into to the tree using one of the
:class:`Element` methods.
Expand Down Expand Up @@ -1294,8 +1294,8 @@ TreeBuilder Objects

.. method:: pi(target, text)

Creates a comment with the given *target* name and *text*. If
``insert_pis`` is true, this will also add it to the tree.
Creates a process instruction with the given *target* name and *text*.
If ``insert_pis`` is true, this will also add it to the tree.

.. versionadded:: 3.8

Expand Down
0