Guido van Rossum <gu...@python.org> added the comment:

Before we backport this to 3.7 and 3.6, let's iterate on the wording a bit.

I don't think the distinction between annotations and type hints is that 
annotations are materialized at runtime while type hints aren't. I think 
syntactically they are the same, but annotations are a slightly more general 
concept because they may be used for other purposes than to indicate the type 
of a variable (or argument, attribute etc.).

So IMO in

  def f():
      x: int

'int' is both an annotation and a type hint, OTOH in

  x: 'spam eggs ham'

we have an annotation that is not a type hint.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32769>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to