__slots_ and inheritance

A. Lloyd Flanagan alloydflanagan at attbi.com
Mon Apr 14 10:46:52 EDT 2003


Alex Martelli <aleax at aleax.it> wrote in message news:<6EWla.4594$LB6.132415 at news1.tin.it>...
> A. Lloyd Flanagan wrote:
> 
> > Unless you absolutely have to have it, don't use it.
> 
> "Absolutely have to have it", just like "screws up big time", are
> silly overbids IMHO -- over-reactions that I don't see as justified
> at all!  Why can't we all just keep SOME perspective, please...?!
> 

Perspective?  Moi??

Seriously, I was going to clarify my statement, then realized that
you'd stated the trade-offs better than I could.  And thanks very much
for the benchmarks, that kind of data is really helpful.

Perhaps I should add a corollary to Knuth's law:  "Premature brevity
is the root of all misunderstandings"?

I think the root of the issue here is that the documentation could be
clearer about when to use __slots__ and when not to.  We could cut and
paste much of your last message into the docs, and it would help a
lot.  How do changes and updates make it into the official docs,
anyway?




More information about the Python-list mailing list