Monday 20 July 2015

Python: __slots__

Cited from Python __slots__

"The proper use of __slots__ is to save space in objects. Instead of having a dynamic dict that allows adding attributes to objects at anytime, there is a static structure which does not allow additions after creation."

No comments:

Post a Comment