Dumb python questions
skip at pobox.com
Thu Aug 16 06:21:22 CEST 2001
Paul> Python seems to be in a somewhat dangerous phase of development
Paul> right now, where a lot of the design still isn't worked out, but
Paul> lots of people are using it, which means any mistakes made are
Paul> hard to undo because people's code will break. Instead, kludges
Paul> get tacked on, potentially resulting in an eventual Perl-like
Paul> monstrosity (why is there a special type of object for xrange?).
Objects/rangeobject.c was first checked in Oct 26, 1993. Checkin was by
Guido with this comment:
rangeobject.[ch]: new object type to speed up range operations (not
convinced this is needed!!!)
I think Guido can be forgiven this misstep, since it was well before he had
set his sights on world domination. Actually, I'm kinda surprised the
checkin message wasn't in Dutch... ;-)
Paul> If you look at the evolution of Scheme, the designers tried very hard
Paul> to get things right from the start, rather than doing what was
Paul> convenient and fixing it later.
Yeah, but Scheme was not drawn on a completely fresh piece of paper either.
While my impression is that the Schemers like to put some distance between
themselves and the rest of the Lisp community, it's not like most of the
problems they were tackling hadn't been encountered before. The xrange
function was added to Python seven years and nine months ago. Iterators
were only added in the last few months. I think xrange has done just fine
in the intervening time. It will get put out to pasture over the next year
or two, with a pat on the back and a gold watch. Much better treatment than
the access statement got...
Python was mostly a one-man show in the early days. If Guido didn't write
it he had to at least be able to read and understand everything anyone else
did write. He was not only the chief cook and bottlewasher, but the dog
that guarded of the gates of Hell^H^H^H^HRCS as well. He no longer has to
growl at the gates quite so viciously, because there are a number of people
he trusts to maintain many (most?) significant parts of the system, so more
ideas that just couldn't have been tackled five years ago can go from idea
to stable implementation in fairly short order.
Paul> That's fair too. Here's something I don't understand: why is it
Paul> that the default value of a function arg is evaluated just once,
Paul> instead of whenever the function is called?
Then it wouldn't be a default now, would it? It would just be another
Skip Montanaro (skip at pobox.com)
More information about the Python-list