SIGN IN SIGN UP

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.
E
Eric V. Smith committed
ea8fc52e75363276db23c6a8d7a689f79efce4f9
Parent: 2a2247c
Committed by GitHub <noreply@github.com> on 1/28/2018, 12:07:40 AM