On 25 Aug 2014 16:29, "Guido van Rossum" <guido@python.org> wrote:
> > … or we could have a decorator for type hints, and ascribe no new
> > meaning at all to __annotations__. Or assume __annotations__ contains
> > type hints iff all the annotations present are instances of typing.*.
> > That might be better anyway, since a decorator could then add (or
> > augment) type information without assigning to __annotations__ (which
> > would be weird).
> >
> > Even if conveying type information is the most useful use of
> > annotations, there's no reason it can't be explicit (and consistent
> > with other uses of annotations).
>
> 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.)

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

Ed Kellett