A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-September/149473.html below:

[Python-Dev] PEP 557: Data Classes

[Python-Dev] PEP 557: Data Classes [Python-Dev] PEP 557: Data Classestds333 at mailbox.org tds333 at mailbox.org
Mon Sep 11 09:43:45 EDT 2017
Hi Eric,

I have on question not addressed yet.
The implementation is based on "__annotations__" where the type is specified.
But "__annotations__" is not always filled. An interpreter version with special optimization
could remove all __annotations__ for performance reasons. (Discussed in other threads)

In this case the dataclass does not work or will there be a fallback?

I know it is a little bit hypothetical because an interpreter with this optimization is
not there yet. I am looking only in the future a bit.
Asking this because type annotations are stated as completely optional for Python.
And this use case will break this assumption.

Personally I am a heavy user of attrs and happy to have a dataclass in the std lib.

Regards

Wolfgang
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4