[Python-Dev] PEP 563: Postponed Evaluation of Annotations
Nick Coghlan
ncoghlan at gmail.com
Fri Nov 10 02:36:25 EST 2017
More information about the Python-Dev mailing list
Fri Nov 10 02:36:25 EST 2017
- Previous message (by thread): [Python-Dev] PEP 563: Postponed Evaluation of Annotations
- Next message (by thread): [Python-Dev] PEP 563: Postponed Evaluation of Annotations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 10 November 2017 at 16:42, Victor Stinner <victor.stinner at gmail.com> wrote: > I didn't follow the discussion on the PEP but I was surprised to read "from > __future__ import annotations" in an example. Annotations exist since Python > 3.0, why would Python 3.7 require a future for them? Well, I was aware of > the PEP, but I was confused anyway. > > I really prefer "from __future__ import string_annotations" ! At risk of complicating matters, I now see that this could be read as "annotations on strings", just as variable annotations are annotations on variable names, and function annotations are annotations on functions. If we decide we care about that possible misreading, then an alternative would be to swap the word order and use "from __future__ import annotation_strings". Cheers, Nick. P.S. I don't think this really matters either way, it just struck me that the reversed order might be marginally clearer, so it seemed worthwhile to mention it. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message (by thread): [Python-Dev] PEP 563: Postponed Evaluation of Annotations
- Next message (by thread): [Python-Dev] PEP 563: Postponed Evaluation of Annotations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list