Skip to content

Commit 23469df

Browse files
Reformat Expact implementation detail note.
1 parent f39e8cb commit 23469df

1 file changed

Lines changed: 20 additions & 15 deletions

File tree

Doc/library/pyexpat.rst

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,26 @@ The :mod:`!xml.parsers.expat` module contains two functions:
6363

6464
.. function:: ParserCreate(encoding=None, namespace_separator=None)
6565

66-
Creates and returns a new :class:`xmlparser` object. *encoding*, if specified,
67-
must be a string naming the encoding used by the XML data.
68-
Expat natively understands and processes UTF-8, UTF-16, UTF-16BE, UTF-16LE,
69-
ISO-8859-1, and US-ASCII.
70-
For other encodings (including aliases like Latin1 and ASCII) it falls back
71-
to Python.
72-
It supports most of 8-bit encodings and many multi-byte encodings like
73-
Shift_JIS, although only BMP characters (``U+0000-U+FFFF``) are supported
74-
with non-native encodings (this restriction is also applied to aliases
75-
like UTF8).
76-
If *encoding* [1]_ is given it will override the implicit or explicit
77-
encoding of the document and the restrictions mentioned above will not apply.
66+
Creates and returns a new :class:`xmlparser` object.
67+
*encoding* [1]_, if specified, must be a string naming the encoding
68+
used by the XML data.
69+
If it is given it will override the implicit or explicit encoding
70+
of the document.
71+
72+
.. impl-detail::
73+
74+
Expat natively understands and processes UTF-8, UTF-16, UTF-16BE,
75+
UTF-16LE, ISO-8859-1, and US-ASCII.
76+
For other encodings (including aliases like Latin1 and ASCII) it
77+
falls back to Python.
78+
It supports most of 8-bit encodings and many multi-byte encodings
79+
like Shift_JIS, although only BMP characters (``U+0000-U+FFFF``)
80+
are supported with non-native encodings (this restriction is also
81+
applied to aliases like UTF8).
82+
These restrictions only apply if *encoding* is not given.
83+
84+
.. versionchanged:: next
85+
Added support for multi-byte encodings.
7886

7987
.. _xmlparser-non-root:
8088

@@ -119,9 +127,6 @@ The :mod:`!xml.parsers.expat` module contains two functions:
119127
XML document. Call ``ParserCreate`` for each document to provide unique
120128
parser instances.
121129

122-
.. versionchanged:: next
123-
Added support for multi-byte encodings.
124-
125130
.. seealso::
126131

127132
`The Expat XML Parser <http://www.libexpat.org/>`_

0 commit comments

Comments
 (0)