Tom Ritchford
Apr 29, 2023

--

Perhaps even more important, classes with `__slots__` are a lot smaller in memory and a little faster.

A classic class has a dictionary of class attributes. A class with `__slots__` does not have this: the attributes are stored internally in order.

--

--

No responses yet