>
> Why is dataclass a decorator instead of a metaclass (or, as below,
> pseudo-metaclass) anyway?
>

One reason: because a class can only have one metaclass.

So if dataclass were a metaclass, it would not be possible to create a
dataclass using an existing metaclass multiple inheritance... which, ain't
nobody got time for THAT.
_______________________________________________
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/Z4WJZZT4UZU44A4MHPP65HD24GKSEJR5/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to