CircuitPython does not use __slots__ within class definitions. Support for __slots__ could result in potentially significant runtime and memory savings, especially for classes with lots of instances (because no __dict__ per instance is needed).
Some of the benefits of __slots__ overlap with collections.namedTuple, but namedTuple instances are immutable. However, I suspect even a naive/limited __slots__ support implementation would probably be more complex than namedTuple.
CircuitPython does not use
__slots__within class definitions. Support for__slots__could result in potentially significant runtime and memory savings, especially for classes with lots of instances (because no__dict__per instance is needed).Some of the benefits of
__slots__overlap withcollections.namedTuple, but namedTuple instances are immutable. However, I suspect even a naive/limited__slots__support implementation would probably be more complex than namedTuple.