[Python-Dev] Concerns about method overriding and subclassing with dataclasses
Guido van Rossum
guido at python.org
Fri Dec 29 19:52:31 EST 2017
More information about the Python-Dev mailing list
Fri Dec 29 19:52:31 EST 2017
- Previous message (by thread): [Python-Dev] Concerns about method overriding and subclassing with dataclasses
- Next message (by thread): [Python-Dev] Concerns about method overriding and subclassing with dataclasses
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I still think it should overrides anything that's just inherited but nothing that's defined in the class being decorated. On Dec 29, 2017 5:43 PM, "Nathaniel Smith" <njs at pobox.com> wrote: > On Fri, Dec 29, 2017 at 12:30 PM, Ethan Furman <ethan at stoneleaf.us> wrote: > > Good point. So auto-generate a new __repr__ if: > > > > - one is not provided, and > > - existing __repr__ is either: > > - object.__repr__, or > > - a previous dataclass __repr__ > > > > And if the auto default doesn't work for one's use-case, use the keyword > > parameter to specify what you want. > > What does attrs do here? > > -n > > -- > Nathaniel J. Smith -- https://vorpus.org > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: https://mail.python.org/mailman/options/python-dev/ > guido%40python.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20171229/8c97b53f/attachment.html>
- Previous message (by thread): [Python-Dev] Concerns about method overriding and subclassing with dataclasses
- Next message (by thread): [Python-Dev] Concerns about method overriding and subclassing with dataclasses
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list