CPython internal design question

Courageous jkraska at san.rr.com
Fri Dec 14 17:15:30 EST 2001
The various different internal structures of python use
a definition strategy like this:

typedef struct {
    PyObject_HEAD
    PyObject *im_func;        /* The callable object implementing the method */
    PyObject *im_self;        /* The instance it is bound to, or NULL */
    PyObject *im_class;       /* The class that asked for the method */
    PyObject *im_weakreflist; /* List of weak references */
} PyMethodObject;

What was the rationale behind the "im_" prefixes on all of
the structure's member variables?

C//




More information about the Python-list mailing list