[issue42525] Optimize class/module level annotation

Yurii Karabas report at bugs.python.org
Sun Dec 20 05:55:47 EST 2020


Yurii Karabas <1998uriyyo at gmail.com> added the comment:

After several attempts to optimize class/module annotations, I didn't find a solution that won't break existing code and can cover all existing edge cases.

The root cause was mentioned by Inada, the problem that `__annotations__` is exposed to locals and can be dynamically modified and that can't be predicted at compilation time.

Sorry about this issue, when I was creating this issue, I didn't realize the whole problem state.

We can close this issue.

----------

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


More information about the Python-bugs-list mailing list