]> granicus.if.org Git - python/commitdiff
Rephrase PyUnicode_CompareWithASCIIString() documentation
authorVictor Stinner <victor.stinner@haypocalc.com>
Tue, 28 Dec 2010 23:39:51 +0000 (23:39 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Tue, 28 Dec 2010 23:39:51 +0000 (23:39 +0000)
Doc/c-api/unicode.rst

index fd36356600d8904271ed66e9672e6f999543a59a..6783f650907ce392b5520a2fa1f291ff267bdda8 100644 (file)
@@ -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)