cpython/Objects
Guido van Rossum 242c64256c Add a new function PyNumber_CoerceEx() which works just like
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.
1997-11-19 16:03:17 +00:00
..
Makefile.in New build procedure. 1997-07-19 19:39:57 +00:00
abstract.c Renamed a local variable from 'PyCFunction' (which is also a typedef 1997-05-20 22:09:08 +00:00
classobject.c Undo another glitch of the automatic not-so-Grand Renaming; some local 1997-11-18 19:23:07 +00:00
cobject.c New CObject from Jim Fulton, adds PyCObject_FromVoidPtrAndDesc() and 1997-10-21 19:48:35 +00:00
complexobject.c Got rid of c_error in favor of errno (and EDOM/ERANGE). 1997-05-20 18:21:34 +00:00
dictobject.c Correct Barry's fix -- take care of {}.get(0). 1997-10-20 20:10:00 +00:00
fileobject.c Fix problem discovered by Barry: if you hit ^C to 1997-11-07 19:20:34 +00:00
floatobject.c Hack suggested by Matthias Klose to pull in all relevant entry points 1997-10-31 17:00:30 +00:00
frameobject.c Add cast to realloc/malloc call to shut up AIX compiler. (Vladimir Marangozov) 1997-10-31 20:32:13 +00:00
funcobject.c Fix bug in comparing function objects detected by Sjoerd: 1997-08-05 16:51:05 +00:00
intobject.c Added _Fini() routines to free up some memory 1997-08-05 02:16:08 +00:00
listobject.c Rename roundup() to roundupsize(), as there's a macro roundup() in the 1997-08-25 18:36:23 +00:00
longobject.c Quickly renamed the last directory. 1997-05-02 03:12:38 +00:00
methodobject.c Added separate free list for cfunction (builtin method) objects, for a 1997-08-05 02:11:41 +00:00
moduleobject.c removed last #ifdef SUPPORT_OBSOLETE_ACCESS bits. 1997-05-09 01:07:15 +00:00
object.c Add a new function PyNumber_CoerceEx() which works just like 1997-11-19 16:03:17 +00:00
rangeobject.c Quickly renamed the last directory. 1997-05-02 03:12:38 +00:00
sliceobject.c Ellipses -> Ellipsis rename (the dictionary really says that it should 1996-10-11 16:25:41 +00:00
stringobject.c Patch submitted by Brad Howes (with one bug fixed by me): allow 1997-09-08 18:30:11 +00:00
tupleobject.c PyTuple_SetItem should require that the tuple's refcnt is one! 1997-08-17 16:25:45 +00:00
typeobject.c American spelling in doc string. 1997-06-02 14:43:07 +00:00
xxobject.c New permission notice, includes CNRI. 1996-10-25 14:44:06 +00:00