[issue1717] Get rid of more refercenes to __cmp__
Christian Heimes
report at bugs.python.org
Tue Dec 9 00:12:28 CET 2008
Christian Heimes <lists at cheimes.de> added the comment:
Marc-Andre, how do you like a function PyUnicode_Equal() instead of
PyUnicode_Compare()?
The old PyUnicode_Compare() function returns -1 for smaller value and
errors, 0 for equality and +1 for larger value. I find it confusing to
have one function that follows the old PyObject_Compare() behavior.
Instead I'm proposing PyUnicode_Equal() which returns -1 for errors, 0
for unequal and +1 for equal. The function follows the semantic of
http://docs.python.org/c-api/object.html#PyObject_RichCompareBool nicely.
About your proposal for cmp(), where should we put the method? I'm -0.5
on builtins.
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1717>
_______________________________________
More information about the Python-bugs-list
mailing list