[issue36466] Adding a way to strip annotations from compiled bytecode

Guido van Rossum report at bugs.python.org
Sun Mar 31 11:36:55 EDT 2019


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

There's a similar thing with docstrings though. Some code depend on docstrings (e.g. David Beazley's parser generator). help() of course also depends on it. And yet we have a way to disable it. (Same with asserts, plenty of code depends on them even though we recommend against it.)

So as long as we have a separate mechanism to disable this I'm not worried -- it's up to the person that runs the program to ensure that they don't use functionality that breaks when annotations are suppressed.

(Note that functools.singledispatch has an alternate registration syntax that doesn't require annotations.)

----------

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


More information about the Python-bugs-list mailing list