Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 80e788a

Browse files
author
Victor Stinner
committed
Rephrase PyUnicode_CompareWithASCIIString() documentation
1 parent ece98d6 commit 80e788a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Doc/c-api/unicode.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,8 +1063,9 @@ They all return *NULL* or ``-1`` if an exception occurs.
10631063
.. c:function:: int PyUnicode_CompareWithASCIIString(PyObject *uni, char *string)
10641064
10651065
Compare a unicode object, *uni*, with *string* and return -1, 0, 1 for less
1066-
than, equal, and greater than, respectively. *string* is an ASCII-encoded
1067-
string (it is interpreted as ISO-8859-1).
1066+
than, equal, and greater than, respectively. It is best to pass only
1067+
ASCII-encoded strings, but the function interprets the input string as
1068+
ISO-8859-1 if it contains non-ASCII characters".
10681069
10691070
10701071
.. c:function:: int PyUnicode_RichCompare(PyObject *left, PyObject *right, int op)

0 commit comments

Comments
 (0)