metaclass and customization with parameters

Anna Martelli Ravenscroft anna at aleax.it
Mon Oct 4 12:40:49 EDT 2004


Alex Martelli wrote:
> Carlos Ribeiro <carribeiro at gmail.com> wrote:

>>Figuring out the obvious tend to be a big barrier to the learning
>>process. For experienced writers, it tends to be a problem also,
>>because it's so obvious that one feels compelled to leave it out of
>>the explanation. But that's the issue here -- the fact that what I'm
>>freely calling 'class declarations' in Python are not really
>>declarations (in the same sense of C++, for example), are just
> 
> 
> Well, _this_ experienced writer keeps repeating this fact over and over
> and over again in _his_ explanations (e.g., Nutshell p. 32: "Unlike
> other languages, Python has no declarations"), but of course that
> doesn't help all that much if one's explanations just aren't read.
> 
> Some simple google search such as:
> <http://groups.google.com/groups?as_oq=declaration%20declarations&safe=i
> mages&ie=UTF-8&as_ugroup=comp.lang.python&as_uauthors=martelli&lr=&num=2
> 0&hl=en>
> can further show you that I _ceaselessly_ keep repeating this...
> *hundreds* of times...: "def is not a declaration: it's an executable
> statement", "Python has no declarations", "For that, you'd need some
> kind of declaration. Python does not have declarations", "Right, since
> we have no declarations." -- over and over and OVER again.  And there
> are just snippets readable in the short google summaries of the FIRST
> page out of 351 hits.
> 
> So, for once, it seems to me that, on this specific subject at least, I
> should be held blameless: far from feeling compelled to leave it out, I
> am _obsessive_ about pointing it out again and again and AGAIN.  I don't
> think I can do much more to get the point across that "*Python has no
> declarations, only executable statements*", except maybe personally seek
> out every poster who speaks of "declarations in Python", grab them by
> their lapels and shout the truth out in their faces.  Sorry, I get too
> many frequent flier miles as it, without adding all of these side trips
> too.  If (at least some) experienced writers are doing the best they
> possibly can to get this crucial point across, and some readers still
> just can't get it no matter what, perhaps it's not all that useful to
> blame the writers -- and the READERS should perhaps take SOME
> responsibility for listening to the unceasing repetitions in
> question...?!

Being completely unbiased, of course, I will say that you do a damn fine 
job of mostly avoiding the "expert's error" of leaving out the "obvious" 
stuff.

Anna



More information about the Python-list mailing list