In article <5a3a5737-f1b7-4419-9bb3-088c244a4...@c13g2000vbr.googlegroups.com>, Carl Banks <pavlovevide...@gmail.com> wrote: > >However, Aahz will be by shortly to tell you never to use slots.
Please note that there is an important distinction between "don't use slots" and "never use slots" -- if you can locate any instances where I wrote the latter, I will be surprised and issue a retraction. Obviously, slots are an important element of Python, but they should be used only when other approaches have proven impractical. To quote Guido: __slots__ is a terrible hack with nasty, hard-to-fathom side effects that should only be used by programmers at grandmaster and wizard levels. Unfortunately it has gained an enormous undeserved popularity amongst the novices and apprentices, who should know better than to use this magic incantation casually. See also http://www.dalkescientific.com/writings/diary/archive/2006/03/19/class_instantiation_performance.html -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ "If you don't know what your program is supposed to do, you'd better not start writing it." --Dijkstra -- http://mail.python.org/mailman/listinfo/python-list