Le lundi 27 décembre 2010 à 23:13 -0500, R. David Murray a écrit : > > Modified: python/branches/py3k/Doc/c-api/unicode.rst > > ============================================================================== > > --- python/branches/py3k/Doc/c-api/unicode.rst (original) > > +++ python/branches/py3k/Doc/c-api/unicode.rst Mon Dec 27 02:49:29 2010 > > @@ -1063,7 +1063,8 @@ > > .. 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. > > + than, equal, and greater than, respectively. *string* is an > > ASCII-encoded > > + string (it is interpreted as ISO-8859-1). > > Does it mean anything to say that an ASCII string is interpreted as > ISO-8859-1? If it is ASCII-encoded it shouldn't have any bytes with > the 8th bit set, leaving no room for interpretation. So presumably > you mean it is (treated as) an ISO-8859-1 encoded string, despite the > function name?
Oh. Someone noticed :-) I would like to say that it is better to pass only ASCII-encoded string, but the function supports ISO-8859-1. Would it be more clear to say that the function expects ISO-8859-1 encoded string? But I don't want to patch the function. Victor _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com