Default annotations for variables

Kirill Balunov kirillbalunov at gmail.com
Wed Dec 27 06:39:49 EST 2017


2017-12-27 14:19 GMT+03:00 Kirill Balunov <kirillbalunov at gmail.com>:

> Here I was a bit knocked down by the IPython console. Strangely, but the `
> __annotations__` is not initialized to a an empty dict when you start it,
> while in Python console it is.
>

In addition, there are some imbalance without IPython. Since modules and
classes define namespaces it is strange that:

empty `module` -> has `__annotations__` defined to {}.
empty `class` -> does not have `__annotations__` raises AttributeError.

With kind regards, -gdg



More information about the Python-list mailing list