Practice
Learn
← Quit
0 / 0 correct
Python
Medium
1 of 20
What does defining __slots__ on a class do?
A
Enables multiple inheritance
B
Makes instances immutable
C
Makes the class thread-safe
D
Declares fixed attributes and removes the per-instance __dict__, saving memory and speeding attribute access