[issue40583] Runtime type annotation mutation leads to inconsistent behavior
Ivan Levkivskyi
report at bugs.python.org
Fri May 15 17:10:32 EDT 2020
Ivan Levkivskyi <levkivskyi at gmail.com> added the comment:
This is actually a specified behavior (motivated by memory savings for class objects, that are already pretty large). If you scroll down the link you posted it says:
> Note that if annotations are not found statically, then the ``__annotations__`` dictionary is not created at all.
So what do you propose? Changing this behavior is not easy, because it would be a backwards incompatible change.
----------
nosy: +levkivskyi
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40583>
_______________________________________
More information about the Python-bugs-list
mailing list