[3.12] Fix typos in ElementTree documentation (GH-108848) (GH-114854)

PI objects instead of comment objects.
(cherry picked from commit de6f97cd35)

Co-authored-by: Christophe Nanteuil <35002064+christopheNan@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2024-02-01 10:41:01 +01:00 committed by GitHub
parent 09b8b14e05
commit 600724d442
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -664,7 +664,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
:class:`ElementTree` will only contain processing instruction nodes if
they have been inserted into to the tree using one of the
:class:`Element` methods.
@ -1302,8 +1302,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