4 ms·
You can gain a fair memory consumption improvement by using slotted classes. The standard namedtuple and attrs use them. However, dataclasses do not. So, you ca
by enz 7y ago
You can gain a fair memory consumption improvement by using slotted classes. The standard namedtuple and attrs use them. However, dataclasses do not. So, you can have both ergonomics and slotted classes by using attrs.