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
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/2F2OYXUNH3X6RBZI63MI6WHXTMI4QIZG/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to