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

Koos Zevenhoven k7hoven at gmail.com
Sun Nov 12 07:14:50 EST 2017

On Sun, Nov 12, 2017 at 7:07 AM, Guido van Rossum <guido at python.org> wrote:

> On Fri, Nov 10, 2017 at 11:02 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>> On 11 November 2017 at 01:48, Guido van Rossum <guido at python.org> wrote:
>> > I don't mind the long name. Of all the options so far I really only like
>> > 'string_annotations' so let's go with that.
>> +1 from me.
> I'd like to reverse my stance on this. We had `from __future__ import
> division` for many years in Python 2, and nobody argued that it implied
> that Python 2 doesn't have division -- it just meant to import the future
> *version* of division. So I think the original idea, `from __future__
> import annotations` is fine. I don't expect there will be *other* things
> related to annotations that we'll be importing from the future.
Furthermore, *​nobody* expects the majority of programmers to look at
__annotations__ either. But those who do need to care about the
'implementation detail' of whether it's a string won't be surprised to find
nested strings like "'ForwardReferencedThing'". But one might fear that
those cases get ruthlessly converted into being equivalent to just

So actually my question is: What should happen when the annotation is
already a string literal?

-- Koos
+ Koos Zevenhoven + http://twitter.com/k7hoven +
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20171112/f18f1f17/attachment.html>

More information about the Python-Dev mailing list