A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-May/024686.html below:

[Python-Dev] __module__ of newly-created extension classes

[Python-Dev] __module__ of newly-created extension classes [Python-Dev] __module__ of newly-created extension classesDavid Abrahams David Abrahams" <david.abrahams@rcn.com
Thu, 30 May 2002 12:54:56 -0400
From: "Gustavo Niemeyer" <niemeyer@conectiva.com>


> Hi David!
>
> > When creating new-style classes from within an extension module, the
> > current behavior results in the __module__ attribute being set to the
name
> > 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
> "module.TypeName".

Well, that wouldn't fix the __module__ attribute AFAICT. I'm creating new
classes by invoking the metaclass with the name, bases, and dictionary.

-Dave







RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4