mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
[3.13] gh-67206: Document that string.printable
is not printable in the POSIX sense (GH-128820) (#128868)
gh-67206: Document that `string.printable` is not printable in the POSIX sense (GH-128820)
(cherry picked from commit d906bde250
)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
parent
132fd38f13
commit
639e0f36af
2 changed files with 13 additions and 3 deletions
|
@ -59,11 +59,18 @@ The constants defined in this module are:
|
|||
String of ASCII characters which are considered punctuation characters
|
||||
in the ``C`` locale: ``!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~``.
|
||||
|
||||
|
||||
.. data:: printable
|
||||
|
||||
String of ASCII characters which are considered printable. This is a
|
||||
combination of :const:`digits`, :const:`ascii_letters`, :const:`punctuation`,
|
||||
and :const:`whitespace`.
|
||||
String of ASCII characters which are considered printable by Python.
|
||||
This is a combination of :const:`digits`, :const:`ascii_letters`,
|
||||
:const:`punctuation`, and :const:`whitespace`.
|
||||
|
||||
.. note::
|
||||
|
||||
By design, :meth:`string.printable.isprintable() <str.isprintable>`
|
||||
returns :const:`False`. In particular, ``string.printable`` is not
|
||||
printable in the POSIX sense (see :manpage:`LC_CTYPE <locale(5)>`).
|
||||
|
||||
|
||||
.. data:: whitespace
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
Document that :const:`string.printable` is not printable in the POSIX sense.
|
||||
In particular, :meth:`string.printable.isprintable() <str.isprintable>` returns
|
||||
:const:`False`. Patch by Bénédikt Tran.
|
Loading…
Add table
Add a link
Reference in a new issue