• Guido van Rossum's avatar
    Fix a leak in instance_coerce(). This was introduced by Neil's · 24f67d56
    Guido van Rossum yazdı
    earlier coercion changes, not by rich comparisons.  When a coercion
    function returns 1 (meaning it cannot do it), it should not INCREF the
    arguments.  When no __coerce__() method was found, instance_coerce()
    originally returned 0, pretending it did it.  Neil changed the return
    value to 1, more accurately reflecting that it didn't do anything, but
    forgot to take out the two INCREF calls.
    24f67d56
classobject.c 47.3 KB