• Guido van Rossum's avatar
    Add a new function PyNumber_CoerceEx() which works just like · 242c6425
    Guido van Rossum yazdı
    PyNumber_Coerce() except that when the coercion can't be done and no
    other exceptions happen, it returns 1 instead of raising an
    exception.
    
    Use this function in PyObject_Compare() to avoid raising an exception
    simply because two objects with numeric behavior can't be coerced to a
    common type; instead, proceed with the non-numeric default comparison.
    
    Note that this is a somewhat questionable practice -- comparisons for
    numeric objects shouldn't default to random behavior like this, but it
    is required for backward compatibility.  (Case in point, it broke
    comparison of kjDict objects to integers in Aaron Watters' kjbuckets
    extension.)  A correct fix (for python 2.0) should involve a different
    definiton of comparison altogether.
    242c6425
Adı
Son kayıt (commit)
Son güncelleme
..
Makefile.in Loading commit data...
abstract.c Loading commit data...
classobject.c Loading commit data...
cobject.c Loading commit data...
complexobject.c Loading commit data...
dictobject.c Loading commit data...
fileobject.c Loading commit data...
floatobject.c Loading commit data...
frameobject.c Loading commit data...
funcobject.c Loading commit data...
intobject.c Loading commit data...
listobject.c Loading commit data...
longobject.c Loading commit data...
methodobject.c Loading commit data...
moduleobject.c Loading commit data...
object.c Loading commit data...
rangeobject.c Loading commit data...
sliceobject.c Loading commit data...
stringobject.c Loading commit data...
tupleobject.c Loading commit data...
typeobject.c Loading commit data...
xxobject.c Loading commit data...