type method-wrapper?

Robert Brewer fumanchu at amor.org
Mon Dec 20 18:40:10 CET 2004


Thomas Guettler wrote:
> Hi,
> l=[]
> print type(l.__delattr__)
> # --> <type 'method-wrapper'>
> 
> I didn't find a corresponding type in the modules "types".
> Is it missing or am I blind?

You're not blind. Have a look at Objects\decrobject.c in CVS.
http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Objects/des
crobject.c?rev=2.38&view=auto


Relevant bits:

/* --- Wrapper object for "slot" methods --- */

[snip]

static PyTypeObject wrappertype = {
	PyObject_HEAD_INIT(&PyType_Type)
	0,					/* ob_size */
	"method-wrapper",			/* tp_name */


Robert Brewer
MIS
Amor Ministries
fumanchu at amor.org



More information about the Python-list mailing list