__slots_ and inheritance

Alex Martelli aleax at aleax.it
Mon Apr 14 13:04:32 EDT 2003


A. Lloyd Flanagan wrote:

> 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.

Always glad to be of help!


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

Nice observation;-).  Would need expanding, though -- communication
needs some shared starting point, and while assuming more of a start
than is present may induce misunderstanding, the reverse assumption
inevitably means high verbosity...


> 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?

Changes are made to the official docs just like to any other part of
Python - you prepare a proposed patch (to the LaTeX sources, but, with
some imitation of surrounding context, you don't really need to "get"
LaTeX for that purpose...) and submit it to sourceforge -- the doc
czar, Fred Drake, eventually accepts or rejects the patch, or maybe
suggests some rework before it can be accepted.  You're welcome to
use my previous post, in whole or in part, to prepare such a patch,
if you wish (can't do it myself right now...).


Alex





More information about the Python-list mailing list