So what are __slots__ and when should I use them?

dan.j.weber at gmail.com dan.j.weber at gmail.com
Tue Nov 15 22:05:37 EST 2005


I see some programs declaring the names of class variables in
"__slots__". I've looked this up and the docs say something about old
and new style classes, whatever that means. Can someone give me a
simple, brief explanation of what __slots__ are and when I should use
them? Thanks.




More information about the Python-list mailing list