cpython/Objects
Barry Warsaw 0395fdd3a9 Application and elaboration of patch #103305 to fix core dumps when
del'ing func.func_dict.  I took the opportunity to also clean up some
other nits with the code, namely core dumps when del'ing func_defaults
and KeyError instead of AttributeError when del'ing a non-existant
function attribute.

Specifically,

func_memberlist: Move func_dict and __dict__ into here instead of
special casing them in the setattro and getattro methods.  I don't
remember why I took them out of here before I first uploaded the PEP
232 patch. :/

func_getattro(): No need to special case __dict__/func_dict since
their now in the func_memberlist and PyMember_Get() should Do The
Right Thing (i.e. transforms NULL values into Py_None).

func_setattro(): Document the intended behavior of del'ing or setting
to None one of the special func_* attributes.  I.e.:

    func_code - can only be set to a code object.  It can't be del'd
    or set to None.

    func_defaults - can be del'd.  Can only be set to None or a tuple.

    func_dict - can be del'd.  Can only be set to None or a
    dictionary.

Fix core dumps and incorrect exceptions as described above.  Also, if
we're del'ing an arbitrary function attribute but func_dict is NULL,
don't create func_dict before discovering that we'll get an
AttributeError anyway.
2001-01-19 19:53:29 +00:00
..
.cvsignore Ignore a bunch of generated files. 2000-05-02 18:34:30 +00:00
Makefile.in Update dependencies per /F. 2000-11-28 12:09:18 +00:00
abstract.c Rich comparisons fall-out: 2001-01-17 15:29:42 +00:00
bufferobject.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
classobject.c Rich comparisons fallout: instance_hash() should check for both 2001-01-18 23:46:31 +00:00
cobject.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
complexobject.c Use rich comparisons to fulfill an old wish: complex numbers now raise 2001-01-18 01:12:39 +00:00
dictobject.c Rich comparisons: 2001-01-18 00:39:02 +00:00
fileobject.c Move distributed and duplicated config for stat() and fstat() into pyport.h. 2001-01-18 03:03:16 +00:00
floatobject.c Rich comparisons fall-out: 2001-01-17 15:33:42 +00:00
frameobject.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
funcobject.c Application and elaboration of patch #103305 to fix core dumps when 2001-01-19 19:53:29 +00:00
intobject.c Rich comparisons fall-out: 2001-01-17 15:32:23 +00:00
listobject.c Convert to rich comparisons: 2001-01-17 22:11:59 +00:00
longobject.c Rich comparisons fall-out: 2001-01-17 15:33:18 +00:00
methodobject.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
moduleobject.c Add garbage collection for module objects. Closes patch #102939 and 2001-01-02 15:58:27 +00:00
object.c Rich comparisons fallout: PyObject_Hash() should check for both 2001-01-18 23:33:37 +00:00
rangeobject.c SF patch #103158 by Greg Ball: Don't do unsafe arithmetic in xrange 2001-01-15 18:58:56 +00:00
sliceobject.c Test for NULL returned from PyObject_NEW(). 2000-12-14 15:09:46 +00:00
stringobject.c Derivative of patch #102549, "simpler, faster(!) implementation of string.join". 2001-01-19 03:03:47 +00:00
tupleobject.c Same treatment as listobject.c: 2001-01-18 00:00:53 +00:00
typeobject.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
unicodectype.c unicode database compression, step 3: 2000-09-25 21:48:13 +00:00
unicodeobject.c refactored the unicodeobject/ucnhash interface, to hide the 2001-01-19 09:45:02 +00:00
unicodetype_db.h Added 38,642 missing characters to the Unicode database (first-last 2000-11-03 20:24:15 +00:00
xxobject.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00