<p dir="ltr">On 25 Aug 2014 16:29, "Guido van Rossum" <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:<br>
> > … or we could have a decorator for type hints, and ascribe no new<br>
> > meaning at all to __annotations__. Or assume __annotations__ contains<br>
> > type hints iff all the annotations present are instances of typing.*.<br>
> > That might be better anyway, since a decorator could then add (or<br>
> > augment) type information without assigning to __annotations__ (which<br>
> > would be weird).<br>
> ><br>
> > Even if conveying type information is the most useful use of<br>
> > annotations, there's no reason it can't be explicit (and consistent<br>
> > with other uses of annotations).<br>
><br>
> All that sounds fine, but you still have to have a way to convey all that information to the type checker. Remember, the type checker cannot (or doesn't want to) execute the code and it can only see annotations in their original syntactic form. (But it can indeed be told about certain decorators.)</p>
<p dir="ltr">That's reasonable - I was imagining the decorator for type hints wouldn't do anything (apart from possibly marking the function as having type hints), it would just be there to tell the static checker "this function should be type-checked ".</p>
<p dir="ltr">Ed Kellett</p>