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
A few new flags have been added since the initial implementation of dataclasses. These don't seem to have been added to the __dataclass_params__ field. In the case of kw_only I think that makes sense - it's effectively controlled at a per-field level and the parameter to the dataclass decorator is just a convenience. However, the others seem like a genuine omission.
Your environment
I've just looked at the code for the current main branch.
The text was updated successfully, but these errors were encountered:
Bug report
Dataclasses have an undocumented
__dataclass_params__
class-attribute which appears to document the flags sent to thedataclass
decorator:cpython/Lib/dataclasses.py
Lines 903 to 904 in 6ec57e7
A few new flags have been added since the initial implementation of dataclasses. These don't seem to have been added to the
__dataclass_params__
field. In the case ofkw_only
I think that makes sense - it's effectively controlled at a per-field level and the parameter to thedataclass
decorator is just a convenience. However, the others seem like a genuine omission.Your environment
I've just looked at the code for the current main branch.
The text was updated successfully, but these errors were encountered: