cpython/Objects
Barry Warsaw d6a9e84c81 Committing PEP 232, function attribute feature, approved by Guido.
Closes SF patch #103123.

funcobject.h:

    PyFunctionObject: add the func_dict slot.

funcobject.c:

    PyFunction_New(): Initialize the func_dict slot to NULL.

    func_getattr(): Rename to func_getattro() and change the
    signature.  It's more efficient to use attro methods and dig the C
    string out than it is to re-convert a C string to a PyString.

    Also, add support for getting the __dict__ (a.k.a. func_dict)
    attribute, and for getting an arbitrary function attribute.

    func_setattr(): Rename to func_setattro() and change the signature
    for the same reason.  Also add support for setting __dict__
    (a.k.a. func_dict) and any arbitrary function attribute.

    func_dealloc(): Be sure to DECREF the func_dict slot.

    func_traverse(): Be sure to traverse func_dict too.

    PyFunction_Type: make the necessary func_?etattro() changes.

classobject.c:

    instancemethod_memberlist: Add __dict__

    instancemethod_setattro(): New method to set arbitrary attributes
    on methods (really the underlying im_func).  Raise TypeError when
    the instance is bound or when you're trying to set one of the
    reserved im_* attributes.

    instancemethod_getattr(): Renamed to instancemethod_getattro()
    since that's what it really is.  Also, added support fo getting
    arbitrary attributes through the im_func.

    PyMethod_Type: Do the ?etattr{,o} dance.
2001-01-15 20:40:19 +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 Massive changes as per PEP 208. Read it for details. 2001-01-04 01:39:06 +00:00
bufferobject.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
classobject.c Committing PEP 232, function attribute feature, approved by Guido. 2001-01-15 20:40:19 +00:00
cobject.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
complexobject.c Rationalize use of limits.h, moving the inclusion to Python.h. 2000-09-26 05:46:01 +00:00
dictobject.c dict_update has two boundary conditions: a.update(a) and a.update({}) 2001-01-03 22:34:59 +00:00
fileobject.c Speed getline_via_fgets(), by supplying two "fast paths", although one is 2001-01-15 10:36:56 +00:00
floatobject.c Fix a silly bug in float_pow. Sorry Tim. 2001-01-08 06:29:50 +00:00
frameobject.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
funcobject.c Committing PEP 232, function attribute feature, approved by Guido. 2001-01-15 20:40:19 +00:00
intobject.c Make int a new style number type. Sequence repeat is now done here 2001-01-04 01:45:33 +00:00
listobject.c fix leak 2001-01-03 22:32:16 +00:00
longobject.c Make long a new style number type. Sequence repeat is now done here 2001-01-04 01:46:03 +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 Changes for PEP 208. PyObject_Compare has been rewritten. Instances no 2001-01-04 01:48:10 +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 [ Patch #102852 ] Make % error a bit more informative by indicates the 2000-12-15 13:07:46 +00:00
tupleobject.c Simplify _PyTuple_Resize by not using the tuple free list and dropping 2000-10-05 19:36:49 +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 This patch adds a new feature to the builtin charmap codec: 2001-01-06 14:59:58 +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