[issue32550] STORE_ANNOTATION bytecode is unnecessary and can be removed.

Guido van Rossum report at bugs.python.org
Sat Jan 20 10:54:30 EST 2018


Guido van Rossum <guido at python.org> added the comment:

There is very little code that depends on __annotations__ at all, and none
of it is very subtle. All actual type checking is done by separate tools
(mypy, pytype, PyCharm) that don't import the code and don't care about
__annotations__. The __annotations__ variable exists so that other people
*may* do useful stuff with it, e.g. design run-time type-checking
decorators. So please don't worry about interning.

----------

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


More information about the Python-bugs-list mailing list