[Python-Dev] Re: Type annotations, PEP 649 and PEP 563

2021年10月23日 07:38:36 -0700

On Sat, Oct 23, 2021 at 09:49:10AM -0400, Larry Hastings wrote:
> It's an debatable point since "from future" behavior is always off by 
> default. I'd certainly agree that libraries /should/ support stringized 
> annotations by now, considering they were nearly on by default in 3.10. 
> But I wouldn't say stringized annotations were a "standard" part of 
> Python, yet. As yet they are optional. Optional things aren't 
> standard, and standard things aren't optional.
You misunderstand me. I'm not referring to PEP 563, which is still 
optional and requires the user to opt-in with a future import. I'm 
referring to the *manual* use of strings for forward references, which 
has been part of type-hinting since PEP 484 way back in 2014.
https://www.python.org/dev/peps/pep-0484/#forward-references
I expect that people were using strings for forward references before 
PEP 484, but it was 484 that made it official.
-- 
Steve
_______________________________________________
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/NGW3E43JXZ4N25GPXZIMSIAKHSMHUTSA/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to