PEP0238 lament
Roy Smith
roy at panix.com
Mon Jul 23 08:30:51 EDT 2001
"Tim Peters" <tim.one at home.com> wrote:
> Good thing you stopped before mentioning Perl (yes, 1/2 is 0.5 there)
Well, heck, in perl, "1"/2 is 0.5 as well. I'm sure there are lots of
people new to programming who gets confused when they discover that numbers
and strings are different too. Perhaps we should add auto-conversion of
strings to numbers to python as well? :-)
The thing that scares me most about this idea is that it breaks existing
code. And, the idea that there will be conversion tools, and auto-warnings
generated, don't impress me. You still need to touch all the old code.
What about code that you've shipped to customers already? Are we going to
demand that they not upgrade their python installation, or that they
maintain a new version for their own work and an old version to keep our
stuff going?
While, I happen to like the way integer division works, I could be
convinced that auto-promotion from int to float might be a good thing, if
that's the way the language had been defined in the first place. Too late
to go back now, however.
More information about the Python-list
mailing list