bpo-36077: Update handling of defaulted fields by EpicWink · Pull Request #17322 · python/cpython
Conversation
When a non-defaulted dataclass field follows a defaulted field, the behaviour has changed from raising a TypeError to making all arguments in __init__ following the defaulted field keyword-only.
I'm not sold on the prettiness of the versionchanged area in the docs change: please comment.
When a non-defaulted dataclass field follows a defaulted field, the behaviour has changed from raising a `TypeError` to making all arguments in `__init__` following the defaulted field keyword-only.
Other way around: this pull-request is in direct contradiction with the PEP (it says that non-defaulted fields following defaulted fields cause a TypeError)
This has been superseded by the more explicit solution to be included in Python 3.10 #24909
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters