Future division patch available (PEP 238)
Stephen Horne
steve at lurking.demon.co.uk
Mon Jul 23 00:34:58 EDT 2001
On 22 Jul 2001 22:11:41 GMT, m.faassen at vet.uu.nl (Martijn Faassen)
wrote:
>John W. Baxter <jwbaxter at spamcop.com> wrote:
>[snip]
>> I don't think 1 / 2 producing 0 is broken, so I don't think it needs to
>> be fixed, but that view is unlikely to prevail.
>
>I believe there'll be a huge outcry once it actually looks like
>this is going to be in Python for real, when the people who don't track
>the Python development discover what's up with this.
Of course - there are a *huge* number of algorithms that make use of
integer division, not to mention all the code that simply does
arithmetic using integers and expects an integer result.
If this happens, the Perl community will be laughing at us big time -
and for years to come - as one by one all those Python versions get
upgraded (all those 1.5.2 versions are bound to get changed some time,
even if it takes a while) and Pythons reputation for being a stable
language slowly turns into a joke.
You think red hat looks stupid for including non-release versions of
the compilers in two separate red hat releases - despite the problems
and outcry after the first! - Just wait see what this does to Pythons
reputation!
The thing about the happy majority is that they aren't writing in all
the time. They seem invisible. When they give up on Python because
their working programs turn into seething piles of hard-to-trace bugs
just because they updated the compiler to a new version, and they
figure line-by-line searches of thousands of lines of code would be
hardly more effort than to convert to a *stable* language where they
don't need to worry about the next update, I guess they'll stay
silent. But I'm sure there'll be an outcry at the start.
And if Python changes and *then* the mistake is acknowledged and
reversed - hah!
I probably won't drop Python because of this. I'll certainly argue for
standardising on the version immediately before the change. My Python
scripts may not be that big in general, but there are a lot of them
and I don't even know for sure who is using them. Having dozens of
people screaming at me that their scripts are suddenly giving stupid
results, or hanging (because using float division in the algorithm not
only screws the results up, it prevents termination too) or whatever
is not something I'd like to have to deal with.
Maybe it's time to download the source - and get ready to release my
PythonThatStillWorks version.
More information about the Python-list
mailing list