__slots__. By default, instances of both old and new-style classes have a dictionary for attribute storage. This wastes space for objects. A slot is nothing more than a memory management nicety: when you define __ slots__ on a class, you're telling the Python interpreter that the. By default Python uses a dict to store an object's instance attributes. It involves the usage of __slots__ to tell Python not to use a dict, and only allocate space.