
On Sat, Apr 23, 2022 at 12:11:07PM -0700, Christopher Barker wrote:
On Sat, Apr 23, 2022 at 10:53 AM Pablo Alcain <pabloalcain@gmail.com> wrote:
Overall, I think that not all Classes can be thought of as Dataclasses and, even though dataclasses solutions have their merits, they probably cannot be extended to most of the other classes.
Absolutely. However, this is not an "all Classes" question.
Isn't it? I thought this was a proposal to allow any class to partake in the dataclass autoassignment feature. (Not necessarily the implementation.)
I don't think of dataclasses as "mutable namedtuples with defaults" at all.
What do you think of them as?
But do think they are for classes that are primarily about storing a defined set of data.
Ah, mutable named tuples, with or without defaults? :-) Or possibly records/structs. -- Steve