Correct PY_UNICODE_ISPRINTABLE to Py_UNICODE_ISPRINTABLE.

This commit is contained in:
Guido van Rossum 2008-06-02 22:23:23 +00:00
parent 4f64d25025
commit 564e85c33f
1 changed files with 3 additions and 3 deletions

View File

@ -74,7 +74,7 @@ This issue was once discussed by Hye-Shik Chang [1]_ , but was rejected.
Specification
=============
- Add a new function to the Python C API ``int PY_UNICODE_ISPRINTABLE
- Add a new function to the Python C API ``int Py_UNICODE_ISPRINTABLE
(Py_UNICODE ch)``. This function returns 0 if repr() should escape the
Unicode character ``ch``; otherwise it returns 1. Characters that should
be escaped are defined in the Unicode character database as:
@ -98,7 +98,7 @@ Specification
* Convert leading surrogate pair characters without trailing character
(0xd800-0xdbff, but not followed by 0xdc00-0xdfff) to '\\uXXXX'.
* Convert non-printable characters(PY_UNICODE_ISPRINTABLE() returns 0)
* Convert non-printable characters(Py_UNICODE_ISPRINTABLE() returns 0)
to 'xXX', '\\uXXXX' or '\\U00xxxxxx'.
* Backslash-escape quote characters (apostrophe, 0x27) and add quote
@ -120,7 +120,7 @@ Specification
- Add an ``isprintable()`` method to the string type. ``str.isprintable()``
returns False if repr() should escape any character in the string;
otherwise returns True. The ``isprintable()`` method calls the
`` PY_UNICODE_ISPRINTABLE()`` function internally.
`` Py_UNICODE_ISPRINTABLE()`` function internally.
Rationale