Commit ea8fc52e authored by Eric V. Smith's avatar Eric V. Smith Committed by GitHub

bpo-32513: Make it easier to override dunders in dataclasses. (GH-5366)

Class authors no longer need to specify repr=False if they want to provide a custom __repr__ for dataclasses. The same thing applies for the other dunder methods that the dataclass decorator adds. If dataclass finds that a dunder methods is defined in the class, it will not overwrite it.
parent 2a2247ce
This diff is collapsed.
This diff is collapsed.
In dataclasses, allow easier overriding of dunder methods without specifying
decorator parameters.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment