Christopher Barker wrote:

> ... folks don't want annotations to hurt run-time performance, 
> particularly when they are being used primarily for
> pre-run-time static type checking. 

So are we looking for three separate optimization levels at compile time?

Base level:  evaluate everything, keep it however the original annotations PEP 
said to keep it.

String level:  Characters in an annotation are not evaluated; they just get 
stored in a string.  The string (rather than its value) is then kept however 
the original annotations PEP said things would be kept.

Removal level:  Annotations are used only with source code (perhaps by static 
analyzers before compilation); they are dropped entirely during compilation.  
This might go well with the old compilation mode that drops docstrings.

-jJ
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/6S2CALLLQPDOI2WQFIINW37CXIO5J7VR/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to