Wrong reasons to enhancing the language
Russell E. Owen
owen at astrono.junkwashington.emu
Tue Mar 20 13:23:36 EST 2001
>>I believe many of the improvements in Python 2.0 fall into the category
>>of helpful improvements. I am more doubtful about some of the stuff
>>coming up (including nested scopes, // and rational numbers), but we'll
>>see how it works out.
>
>None of those are Python 2.0 improvements. Nested scopes are an
>optional feature of Python 2.1 and the others are simply *proposed*
>features. This is a *great* time to be debating the numerics issues.
Darn, here I thought I was being so clear, but of course I always know
what I *mean* to say. Let me try again...
I really, really like the enhancements in Python 2.0. Hence: "I believe
many of the improvements in Python 2.0 fall into the category of helpful
improvements." That was a bit understated, perhaps. I think 2.0 was a
total win. Great stuff. Much appreciated.
However, I am dubious about some of the improvements scheduled for 2.1
and 2.2, hence: "I am more doubtful about some of the stuff coming up
(including nested scopes, // and rational numbers), but we'll see how it
works out.
As to the numerics, I'm not upset about the changes, just a bit nervous.
- Rational numbers will be used by default in certain situations (such
as the results of division). I can see where rational numbers and
infinite precision are very nice to have, but I'm not so sure I want
them being used by default in normal calculations. Maybe that's not
rational (sorry). Perhaps my main concern is speed.
- It's hard for me to get enthused about "//". I do see the
justification; I agree that 1/3 = 0 is a non-obvious thing and a trap
for non-c mavens. But I'm inclined to live with it rather than add
another operator. "//" looks confusing to me (though at least it's a
flavor of division, not something totally unrelated such as a comment).
I'm not going to jump up and down about it either way. Maybe Python 3000
can have "/" be a float operator!?
I've posted a lot about nested scopes. Summary: mediocre implementation
with funny exceptions and too many chances to shoot self in foot. I'd
rather simplify it or dump it.
-- Russell
More information about the Python-list
mailing list