[Python-Dev] Concerns about method overriding and subclassing with dataclasses (original) (raw)
Stephen J. Turnbull turnbull.stephen.fw at u.tsukuba.ac.jp
Tue Jan 2 21:11:39 EST 2018
- 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 ]
Chris Barker writes:
are we only talking about repr here ???
I am, because I haven't thought about the other methods, except to note I find it hard to imagine a use case for me that would require any of them. That sorta disqualifies me from comment. ;-) I assumed others were talking about all of the dataclass autogenerated methods, though.
And the fact that you can optionally tell it not to in some particular case keeps full flexibility.
AFAICS there is no question about that, just about how you indicate that you do or don't want autobogotification.
Will you get the "right" repr now if you derive a datacalss from a dataclass? That would be a nice feature.
I hadn't thought about that: I wouldn't call it "nice", I'd say it's a sine-qua-back-to-the-drawing-board.
- 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 ]