When comparing bound methods, use identity test on the objects,

not equality test.
This commit is contained in:
Guido van Rossum 1998-12-04 18:52:55 +00:00
parent cf183acf15
commit 13fdf5e917
1 changed files with 1 additions and 1 deletions

View File

@ -160,7 +160,7 @@ meth_compare(a, b)
PyCFunctionObject *a, *b;
{
if (a->m_self != b->m_self)
return PyObject_Compare(a->m_self, b->m_self);
return (a->m_self < b->m_self) ? -1 : 1;
if (a->m_ml->ml_meth == b->m_ml->ml_meth)
return 0;
if (strcmp(a->m_ml->ml_name, b->m_ml->ml_name) < 0)