mirror of
https://github.com/python/cpython.git
synced 2025-10-19 16:03:42 +00:00
![]() Remove the `__dict__` and `__weakref__` descriptors from the original class when creating a dataclass from it. An interesting hack, but more localized in scope than gh-135230. This may be a breaking change if people intentionally keep the original class around when using `@dataclass(slots=True)`, and then use `__dict__` or `__weakref__` on the original class. Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> |
||
---|---|---|
.. | ||
__init__.py | ||
dataclass_module_1.py | ||
dataclass_module_1_str.py | ||
dataclass_module_2.py | ||
dataclass_module_2_str.py | ||
dataclass_textanno.py |