On Thu, Oct 21, 2021 at 6:38 AM Christopher Barker <[email protected]> wrote:
>
> Thanks to the SC for such a thoughtful note. I really like where this is 
> going.
>
> One thought.
>
> On Wed, Oct 20, 2021 at 6:21 AM Thomas Wouters <[email protected]> wrote:
>>
>> Is the performance of PEP 649 and PEP 563 similar enough that we can 
>> outright discount it as a concern? Does anyone actually care about the 
>> overhead of type annotations anymore? Are there other options to alleviate 
>> this potential issue (like a process-wide switch to turn off annotations)?
>
> Annotations are used at runtime by at least one std lib module: dataclasses, 
> and who knows how many third party libs. So that may not be practical.
>

This is similar to docstring. Some tools using docstring (e.g. docopt)
prevent using -OO option.
Although some library (e.g. SQLAlchemy) has huge docstring, we can not
use -OO if a time set of module depends on docstring or assertion.

So I think we need some mechanizm to disable optimization like
dropping assertions, docstrings, and annotations per module.

-- 
Inada Naoki  <[email protected]>
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/DMJOQ6JXDQSPRZPOLL4FRADIMP5EZTF6/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to