[Python-Dev] Finding the module from PyTypeObject? (original) (raw)
Armin Rigo arigo at tunes.org
Wed Sep 29 22:17:02 CEST 2004
- Previous message: [Python-Dev] Finding the module from PyTypeObject?
- Next message: [Python-Dev] Finding the module from PyTypeObject?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello Nick,
On Wed, Sep 29, 2004 at 01:24:23PM -0400, Nick Bastin wrote:
Ok, maybe more appropriately, what do people think of adding a PyTypeGetModule (PyTypeObject *) which basically functions like typemodule(PyTypeObject *, void *) (in Objects/typeobject.c) to the public C API, rather than having to dig around in the object themselves?
It looks overkill, when you can do instead:
PyObject* module_name = PyObject_GetAttrString(type, "module");
Armin
- Previous message: [Python-Dev] Finding the module from PyTypeObject?
- Next message: [Python-Dev] Finding the module from PyTypeObject?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]