This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author levkivskyi
Recipients levkivskyi, netbnd
Date 2019-09-02.10:57:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1567421865.32.0.822204648722.issue37835@roundup.psfhosted.org>
In-reply-to
Content
> Maybe any upcoming python version could store this information in __local__ ? So maybe we could clone this ticket to the python core in order to address this?

I would say it is a too big change, and it is unlikely to happen only for the reason like this issue.

> Why is the own class not always inside the __globals__ list of the methods? Is there a reason? Or is this just a missing feature of the python-core?

Because this is a reference to the actual module global namespace. If the class defined inside another function, it is not the module namespace.

You can probably use the metaclass workaround, but note that it will actually modify the module globals (since __globals__ is not a copy).
History
Date User Action Args
2019-09-02 10:58:44levkivskyiunlinkissue37835 messages
2019-09-02 10:57:45levkivskyisetrecipients: + levkivskyi, netbnd
2019-09-02 10:57:45levkivskyisetmessageid: <1567421865.32.0.822204648722.issue37835@roundup.psfhosted.org>
2019-09-02 10:57:45levkivskyilinkissue37835 messages
2019-09-02 10:57:45levkivskyicreate