[Python-Dev] Concerns about method overriding and subclassing with dataclasses
ethan at ethanhs.me
Fri Dec 29 21:52:11 EST 2017
Okay, I think Guido's proposal is a good compromise.
I already have a branch of dataclasses that should implement that behavior,
so perhaps it was meant to be. :)
On Fri, Dec 29, 2017 at 5:13 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> 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>
>> 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
> 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).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev