Default annotations for variables
INADA Naoki
songofacandy at gmail.com
Wed Dec 27 13:08:20 EST 2017
typing's primary intention is "static" typing with tools like mypy.
Introspection is not primary usage.
Adding such information for every class, module, etc makes
Python slower and fatter.
But I want to make Python more swift and slim.
INADA Naoki <songofacandy at gmail.com>
On Wed, Dec 27, 2017 at 8:39 PM, Kirill Balunov <kirillbalunov at gmail.com> wrote:
> 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
> --
> https://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list