[issue13201] Implement comparison operators for range objects

STINNER Victor report at bugs.python.org
Thu Oct 20 15:23:09 CEST 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

+    one = PyLong_FromLong(1);
+    if (!one)
+        return -1;
+    cmp_result = PyObject_RichCompareBool(r0->length, one, Py_EQ);
+    Py_DECREF(one);

If would be nice to have a PyLong_CompareLong() function.

----------
nosy: +haypo

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13201>
_______________________________________


More information about the Python-bugs-list mailing list