(original) (raw)
On Fri, Nov 10, 2017 at 11:02 PM, Nick Coghlan <ncoghlan@gmail.com> wrote:On 11 November 2017 at 01:48, Guido van Rossum <guido@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 "ForwardReferencedThing".
So actually my question is: What should happen when the annotation is already a string literal?
-- Koos
+ Koos Zevenhoven + http://twitter.com/k7hoven +