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

Nick Coghlan ncoghlan at gmail.com
Fri Dec 29 20:13:36 EST 2017


On 30 Dec. 2017 11:01 am, "Ethan Smith" <ethan at ethanhs.me> wrote:



On Fri, Dec 29, 2017 at 4:52 PM, Guido van Rossum <guido at python.org> wrote:

> I still think it should overrides anything that's just inherited but
> nothing that's defined in the class being decorated.
>
>
Could you explain why you are of this opinion? Is it a concern about
complexity of implementation?


Adding a new method to a base class shouldn't risk breaking existing
subclasses.

If folks want to retain the base class implementation, they can request
that explicitly (and doing so isn't redundant at the point of subclass
definition the way it is for methods defined in the class body).

Cheers,
Nick.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20171230/f52ede4a/attachment.html>


More information about the Python-Dev mailing list