• Barry Warsaw's avatar
    Committing PEP 232, function attribute feature, approved by Guido. · d6a9e84c
    Barry Warsaw yazdı
    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.
    d6a9e84c
Adı
Son kayıt (commit)
Son güncelleme
..
Makefile Loading commit data...
Python.h Loading commit data...
abstract.h Loading commit data...
bitset.h Loading commit data...
bufferobject.h Loading commit data...
cStringIO.h Loading commit data...
ceval.h Loading commit data...
classobject.h Loading commit data...
cobject.h Loading commit data...
codecs.h Loading commit data...
compile.h Loading commit data...
complexobject.h Loading commit data...
config.h Loading commit data...
dictobject.h Loading commit data...
errcode.h Loading commit data...
eval.h Loading commit data...
fileobject.h Loading commit data...
floatobject.h Loading commit data...
frameobject.h Loading commit data...
funcobject.h Loading commit data...
graminit.h Loading commit data...
grammar.h Loading commit data...
import.h Loading commit data...
intobject.h Loading commit data...
intrcheck.h Loading commit data...
listobject.h Loading commit data...
longintrepr.h Loading commit data...
longobject.h Loading commit data...
marshal.h Loading commit data...
metagrammar.h Loading commit data...
methodobject.h Loading commit data...
modsupport.h Loading commit data...
moduleobject.h Loading commit data...
node.h Loading commit data...
object.h Loading commit data...
objimpl.h Loading commit data...
opcode.h Loading commit data...
osdefs.h Loading commit data...
parsetok.h Loading commit data...
patchlevel.h Loading commit data...
pgenheaders.h Loading commit data...
py_curses.h Loading commit data...
pydebug.h Loading commit data...
pyerrors.h Loading commit data...
pyfpe.h Loading commit data...
pygetopt.h Loading commit data...
pymem.h Loading commit data...
pyport.h Loading commit data...
pystate.h Loading commit data...
pythonrun.h Loading commit data...
pythread.h Loading commit data...
rangeobject.h Loading commit data...
rename1.h Loading commit data...
sliceobject.h Loading commit data...
stringobject.h Loading commit data...
structmember.h Loading commit data...
sysmodule.h Loading commit data...
token.h Loading commit data...
traceback.h Loading commit data...
tupleobject.h Loading commit data...
ucnhash.h Loading commit data...
unicodeobject.h Loading commit data...