Dumb python questions

Paul Rubin phr-n2001 at nightsong.com
Wed Aug 15 22:56:46 EDT 2001


Peter Hansen <peter at engcorp.com> writes:
> Paul Rubin wrote:
> > 
> > Python is really pleasant to code in and mostly well designed.  I just
> > keep hitting what seem like little lapses of common sense.
> 
> You might say that.  The good news is that what Guido did was
> substitute his own sense, which in the case of language design
> appears generally to be better than the "common" sense.

That's fair.  A consequence though is Python seems like a one-person
project, where Guido did a very good job on the parts he found
interesting, and left other parts somewhat half-baked.  

Python seems to be in a somewhat dangerous phase of development right
now, where a lot of the design still isn't worked out, but lots of
people are using it, which means any mistakes made are hard to undo
because people's code will break.  Instead, kludges get tacked on,
potentially resulting in an eventual Perl-like monstrosity (why is
there a special type of object for xrange?).  

If you look at the evolution of Scheme, the designers tried very hard
to get things right from the start, rather than doing what was
convenient and fixing it later.  

> Your questions are interesting (although they've been
> asked many, many times before), but hold back on judging
> the rationality of the design until you've spent more 
> time with Python and got a better feel for the type of 
> sense that was actually behind it. :-)

That's fair too.  Here's something I don't understand: why is it that
the default value of a function arg is evaluated just once, instead of
whenever the function is called?  The manual has a warning about that
and examples of how to program around it, but it seems like poor
design to need such a warning.



More information about the Python-list mailing list