A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-November/150446.html below:

[Python-Dev] PEP 563: Postponed Evaluation of Annotations

[Python-Dev] PEP 563: Postponed Evaluation of AnnotationsNick Coghlan ncoghlan at gmail.com
Fri Nov 10 02:36:25 EST 2017
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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4