[issue37835] typing.get_type_hints wrong namespace for forward-declaration of inner class

Netzeband report at bugs.python.org
Sat Sep 7 01:33:00 EDT 2019


Netzeband <andre at netzeband.eu> added the comment:

Thanks for your explanations. 

It sounds, that there is no way to fix this issue officially. Only the meta-class workaround is left, which is - as you highlight - really just a workaround.

I anyway always wonder, why functions, which are methods, do not hold a reference to the class, which they belong to. It could help here and second, this would be a good way to differentiate if a function object is a method or not.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37835>
_______________________________________


More information about the Python-bugs-list mailing list