from __past__ import integerDivision (was Re: A modest PEP0238 suggestion)
Lee Harr
missive at frontiernet.net
Mon Jul 23 19:05:37 EDT 2001
On Mon, 23 Jul 2001 21:47:49 +0100, Stephen Horne <steve at lurking.demon.co.uk>:
> On Mon, 23 Jul 2001 18:35:14 GMT, matthew.feinstein at jhuapl.edu (Matt
> Feinstein) wrote:
>
>>Why not make the operator // do what the -old- division operator did,
>>so that the only change that has to be made for backwards
>>compatibility is replace all /'s with //'s?
>
> Nice and easy for the hobbyist - NOT a sane option for professional
> users who've bet their reputations on Python, and besides.
>
> It's precisely what the PEP is suggesting - change the functionality
> of the existing operator for no particularly strong reason, and expect
> everyone to change to a *new* operator to support a *different*
> functionality.
>
> One minor problem is that according to the PEP the original behaviour
> will *not* be supported by *any* single operator - you have to figure
> out for every single use whether the change is necessary - it is not a
> no-brainer.
>
> More important is all the software that is somehow in-the-field - a
> VERY serious problem.
>
I think this is what the PEP is proposing:
// is current / behaviour
/ is new int/int --> fp
we already have people importing things from the __future__,
how difficult would it be to let people drag things from the __past__?
It would certainly make maintaining old applications that rely
on the old behaviour much easier to port over to the new one.
More information about the Python-list
mailing list