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/150450.html below:

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

[Python-Dev] PEP 563: Postponed Evaluation of Annotations [Python-Dev] PEP 563: Postponed Evaluation of AnnotationsNick Coghlan ncoghlan at gmail.com
Fri Nov 10 07:38:11 EST 2017
On 10 November 2017 at 19:20, Lukasz Langa <lukasz at langa.pl> wrote:
> Alright, we're on bikeshed territory now. Finally! :-)
>
> I was always thinking about this as "static annotations". The fact they're
> strings at runtime is irrelevant for most people who will use this future.

It's highly relevant to anyone currently using annotations for a
purpose *other than* type hints, though - they're going to have to
work out how to cope with annotations being strings rather than
eagerly evaluated expressions.

It's also a hopefully useful mnemonic as to what the new runtime
semantics are: the feature flag makes it as if all your annotations
were quoted strings, just without the actual quote markers.

> They don't want string annotations, they want them to not be evaluated on
> import time... they want them to be static. Also, "static typing" et al. I
> think it has a nice vibe to it.

Getting folks to *not* call type hinting static typing is an ongoing
challenge though, so it doesn't seem like a good idea to encourage
that link to me.

Cheers,
Nick.

-- 
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