
Sept. 27, 2019
11:10 p.m.
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.