28 Sep
2019
28 Sep
'19
4:50 a.m.
On 9/27/2019 6:11 PM, Random832 wrote:
On Fri, Sep 27, 2019, at 12:48, Andrew Barnert via Python-ideas wrote:
or get rid of the guarantee that @dataclass returns your class with extra dunders. Why is dataclass a decorator instead of a metaclass (or, as below, pseudo-metaclass) anyway? Is it just that the decorator syntax looks nicer?
It's in the PEP 557 Rationale: so that the class can use metaclasses any way it wants, without interference from dataclasses. Eric