3 ms·
Beware that once you subclass namedtuple you are losing out on one of its beneficial characteristics: memory efficiency. Instances of subclasses have an instanc
by kisielk 15y ago
Beware that once you subclass namedtuple you are losing out on one of its beneficial characteristics: memory efficiency. Instances of subclasses have an instance dict which has a non-trivial overhead. You can avoid this by defining __slots__ again in the subclass.