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 netbnd
Recipients levkivskyi, netbnd
Date 2019-08-20.04:30:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1566275460.53.0.551937905821.issue37835@roundup.psfhosted.org>
In-reply-to
Content
I tried my idea with the small example code above. However it does not work like expected: 
(see zipped example project, attached to this comment)

At the moment where the function decorator is applied to the method of the inner class, the local namespace ("locals()") does not contain any inner class. Even not another inner class, define before the corresponding class.

So the only way to get it working is to add the __locals__ attribute manually after defining the class, which is even more ugly than my suggested workaround with the function decorator :-(

Any further ideas about this?
History
Date User Action Args
2019-08-20 04:31:00netbndsetrecipients: + netbnd, levkivskyi
2019-08-20 04:31:00netbndsetmessageid: <1566275460.53.0.551937905821.issue37835@roundup.psfhosted.org>
2019-08-20 04:31:00netbndlinkissue37835 messages
2019-08-20 04:30:59netbndcreate