[Python-ideas] Trial balloon: adding variable type declarations in support of PEP 484

Eric Snow ericsnowcurrently at gmail.com
Fri Aug 5 18:37:04 EDT 2016


On Fri, Aug 5, 2016 at 10:41 AM, Guido van Rossum <guido at python.org> wrote:
> Actually my current leaning is as follows:
>
> [for modules: evaluate and store in mod.__annotations__]
> [for classes: evaluate and store in cls.__annotations__]
> [for function bodies: recognize but do not evaluate]

I wonder if that distinction will bias anyone away from using
annotations in function bodies (or using them at all).  Probably not
significantly.

-eric


More information about the Python-ideas mailing list