mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
change comparing instance methods
This commit is contained in:
parent
f1bb334950
commit
e9df727176
1 changed files with 3 additions and 4 deletions
|
@ -1209,10 +1209,9 @@ static int
|
||||||
instancemethod_compare(a, b)
|
instancemethod_compare(a, b)
|
||||||
instancemethodobject *a, *b;
|
instancemethodobject *a, *b;
|
||||||
{
|
{
|
||||||
int cmp = cmpobject(a->im_self, b->im_self);
|
if (a->im_self != b->im_self)
|
||||||
if (cmp == 0)
|
return (a->im_self < b->im_self) ? -1 : 1;
|
||||||
cmp = cmpobject(a->im_func, b->im_func);
|
return cmpobject(a->im_func, b->im_func);
|
||||||
return cmp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static object *
|
static object *
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue