2 ms·
I would also add __slots__ = () to your class definition so that instances of Foo keep the small memory footprint benefits do namedtuple.
by throwaway274739 10y ago
I would also add
__slots__ = ()
to your class definition so that instances of Foo keep the small memory footprint benefits do namedtuple.