Re: [Python-Dev] Concerns about method overriding and subclassing with dataclasses

2018-01-01 Thread Guido van Rossum
On Mon, Jan 1, 2018 at 8:50 PM, Ethan Smith wrote: > > > On Mon, Jan 1, 2018 at 5:03 PM, Chris Barker > wrote: > >> On Sat, Dec 30, 2017 at 7:27 AM, Stephen J. Turnbull < >> turnbull.stephen...@u.tsukuba.ac.jp> wrote: >> >>> Just use the simple rule that a new >>> __repr__ is generated unless

Re: [Python-Dev] Concerns about method overriding and subclassing with dataclasses

2018-01-01 Thread Chris Barker
On Mon, Jan 1, 2018 at 7:50 PM, Ethan Smith wrote: > > Will you get the "right" __repr__ now if you derive a datacalss from a >> dataclass? That would be a nice feature. >> > > > The __repr__ will be generated by the child dataclass unless the user > overrides it. So I believe this is the "right"

Re: [Python-Dev] Concerns about method overriding and subclassing with dataclasses

2018-01-01 Thread Ethan Smith
On Mon, Jan 1, 2018 at 5:03 PM, Chris Barker wrote: > On Sat, Dec 30, 2017 at 7:27 AM, Stephen J. Turnbull < > turnbull.stephen...@u.tsukuba.ac.jp> wrote: > >> Just use the simple rule that a new >> __repr__ is generated unless provided in the dataclass. >> > > are we only talking about __repr_

Re: [Python-Dev] Concerns about method overriding and subclassing with dataclasses

2018-01-01 Thread Chris Barker
On Sat, Dec 30, 2017 at 7:27 AM, Stephen J. Turnbull < turnbull.stephen...@u.tsukuba.ac.jp> wrote: > Just use the simple rule that a new > __repr__ is generated unless provided in the dataclass. > are we only talking about __repr__ here ??? I interpretted Guido's proposal as being about all me