You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copyright 2017-2022 Eric V. Smith, all rights reserved.
This is an implementation of PEP 557, Data Classes. It is a backport
for Python 3.6. Because dataclasses will be included in Python 3.7,
any discussion of dataclass features should occur on the python-dev
mailing list at https://mail.python.org/mailman/listinfo/python-dev.
At this point this repo should only be used for historical purposes
(it's where the original dataclasses discussions took place) and for
discussion of the actual backport to Python 3.6.
Some additional tools can be found in dataclass_tools.py, included in
the sdist.
Compatibility
This backport assumes that dict objects retain their insertion order.
This is true in the language spec for Python 3.7 and greater. Since
this is a backport to Python 3.6, it raises an interesting question:
does that guarantee apply to 3.6? For CPython 3.6 it does. As of the
time of this writing, it's also true for all other Python
implementations that claim to be 3.6 compatible, of which there are
none. Any new 3.6 implementations are expected to have ordered dicts.
See the analysis at the end of this email: