On Sat, 2021-04-24 at 21:33 -0700, Guido van Rossum wrote:
Another thing that surprises me is that apparently the names of the various allowable keyword arguments (eq, final etc.) is fixed, and you can only specify whether they are supported and their default setting? That seems super dependent on the current set of popular "dataclass-like" functions. (And unlike Paul, I don't think that now dataclasses exist in the stdlib, the other libraries should defer to its interface or implementation -- I think there's plenty of room for new class decorators along these lines.)
If so, then why limit to those intended to provide equivalent of dataclass? Perhaps this is a cross-cutting case here. If this is a method to provide templates for types (or perhaps factories of said types), I guess that could make sense. If this is to somehow imbue dataclass-like properties on non-dataclass-dataclasses that don't implement dataclass' interface, I'm still skeptical.