From: Victor Stinner Date: Tue, 28 Dec 2010 23:39:51 +0000 (+0000) Subject: Rephrase PyUnicode_CompareWithASCIIString() documentation X-Git-Tag: v3.2rc1~290 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=80e788a5ddddc2d4a01f25e8021534e4d6239d39;p=python Rephrase PyUnicode_CompareWithASCIIString() documentation --- diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst index fd36356600..6783f65090 100644 --- a/Doc/c-api/unicode.rst +++ b/Doc/c-api/unicode.rst @@ -1063,8 +1063,9 @@ They all return *NULL* or ``-1`` if an exception occurs. .. c:function:: int PyUnicode_CompareWithASCIIString(PyObject *uni, char *string) Compare a unicode object, *uni*, with *string* and return -1, 0, 1 for less - than, equal, and greater than, respectively. *string* is an ASCII-encoded - string (it is interpreted as ISO-8859-1). + than, equal, and greater than, respectively. It is best to pass only + ASCII-encoded strings, but the function interprets the input string as + ISO-8859-1 if it contains non-ASCII characters". .. c:function:: int PyUnicode_RichCompare(PyObject *left, PyObject *right, int op)