Netzeband <[email protected]> added the comment:
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?
----------
Added file:
https://bugs.python.org/file48552/get_type_hints_for_inner_classes.zip
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue37835>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com