Future division patch available (PEP 238)

Stephen Horne steve at lurking.demon.co.uk
Mon Jul 23 22:47:43 CEST 2001


On Mon, 23 Jul 2001 21:02:08 +1000, "Glen Wheeler" <wheelege at tsn.cc>
wrote:

>
>----- Original Message -----
>From: "Stephen Horne" <steve at lurking.demon.co.uk>
>Newsgroups: comp.lang.python
>To: <python-list at python.org>
>Sent: Monday, July 23, 2001 2:34 PM
>Subject: Re: Future division patch available (PEP 238)
>> ...
>> Mathematically, integer division should be the inverse of integer
>> multiplication, with no extra functionality bar the need to allow for
>> the remainder. Well shock horror - that's exactly what we've got now
>> and exactly what we're throwing away.
>> ...
>
>  I don't know about that, I think your just splurting exaggeration here.
>Even though I do agree with you, I do not think Guido's big plan is to
>remove integer division.

True - but he IS breaking existing code over a clearly debatable point
of view which has not even been proven to be supported by a majority.
If those who want int/int->float are so anti the // operator, why is
it that everyone else is supposed to put up and shut up?

>  However, I seem to remember a list of things Tim wrote about python - one
>of them that stuck was 'Explicit is better than implicit'.  If I give
>integer arguments to the / operator, I fully expect integer division to
>occur.  If I want float I'll ask for it, explicitly.

He can twist this by saying an explicitly different division operator
suits that viewpoint - but I don't mind that so long as the new
functionality becomes the new operator.

>  Either way, python will still be my language of choice.

If I take serious damage to my professional reputation because of this
change and my vocal Python advocacy, I'll more than likely be starting
up my own competing scripting language. I won't expect success, but it
will be interesting and I will expect that others will have the same
thought, so once the breakaway projects start coalescing there might
well be a *better* alternative in the end. Maybe a bit melodramatic,
but it's not like it's hard to find a scripting language market these
days.

I'd rather stick with Python, but once bitten twice shy.




More information about the Python-list mailing list