Don't use __slots__ (was Re: Problem of Readability of Python)

Aahz aahz at pythoncraft.com
Mon Oct 8 00:27:31 EDT 2007


In article <2tqdncU0D6K8v5TanZ2dnUVZ_hGdnZ2d at comcast.com>,
Steven Bethard  <steven.bethard at gmail.com> wrote:
>
>You can use __slots__  [...]

Aaaugh!  Don't use __slots__!

Seriously, __slots__ are for wizards writing applications with huuuge
numbers of object instances (like, millions of instances).  For an
extended thread about this, see

http://groups.google.com/group/comp.lang.python/browse_thread/thread/8775c70565fb4a65/0e25f368e23ab058
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

The best way to get information on Usenet is not to ask a question, but
to post the wrong information.



More information about the Python-list mailing list