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:59:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
(Sorry for typos, fixed now.)

> 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 is defined inside another function, it is not in 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).
Date User Action Args
2019-09-02 10:59:50levkivskyisetrecipients: + levkivskyi, netbnd
2019-09-02 10:59:50levkivskyisetmessageid: <>
2019-09-02 10:59:50levkivskyilinkissue37835 messages
2019-09-02 10:59:50levkivskyicreate