[Python-Dev] __module__ of newly-created extension classes
David Abrahams" <email@example.com
Thu, 30 May 2002 12:54:56 -0400
From: "Gustavo Niemeyer" <firstname.lastname@example.org>
> Hi David!
> > When creating new-style classes from within an extension module, the
> > current behavior results in the __module__ attribute being set to the
> > of the Python module which first imports the extension module.
> I'm not sure I understood your problem. If I got it correctly, you will
> get the right behavior by setting tp_name to something like
Well, that wouldn't fix the __module__ attribute AFAICT. I'm creating new
classes by invoking the metaclass with the name, bases, and dictionary.