Future division patch available (PEP 238)

Steve Horne sh at ttsoftware.co.uk
Mon Jul 23 16:08:14 CEST 2001

On 23 Jul 2001 12:52:33 +0200, Martin von Loewis
<loewis at informatik.hu-berlin.de> wrote:

>Steve Horne <sh at ttsoftware.co.uk> writes:
>> Yes, but what about my existing algorithm in some code somewhere that
>> uses n / 2 to partition an array and checks for == 0 as the
>> termination condition. It's not exactly going to work very well after
>> the change, is it.
>No, that is what the transition procedure to support the language
>change must solve. One possible procedure would be

This isn't going to be a little problem. It's going to happen in a lot
of scripts - many of which are used in environments where no-one is
going the warning - and I don't know how many scripts I wrote, or who
has copies of them, or who has personally modified versions or
anything much that would allow me to sort the problem out in advance.

If a new keyword breaks an identifier, then the transition procedure
is fine - even if something falls through the catch-it-early net
relatively few programs will be broken, they will always break in a
clearly detectable way once the keyword is unconditionally recognised
(much better than having trusted programs suddenly giving incorrect
results), and fixing them is simple. Plus anyone who has thought about
it will probably be using identifiers with at least one capital letter
- avoiding conflict with future keywords - anyway.

Changing the division operator is a very different thing.

Steve Horne
Home : steve at lurking.demon.co.uk
Work : sh at ttsoftware.co.uk

More information about the Python-list mailing list