proposed language change to int/int==float (was: PEP0238 lament)

Stephen Horne steve at lurking.demon.co.uk
Mon Jul 23 18:23:31 EDT 2001


On Mon, 23 Jul 2001 21:36:21 +0100, Gareth.McCaughan at pobox.com (Gareth
McCaughan) wrote:

>Grant Edwards wrote:
>
>> What I don't understand is why polymorphism is all of a sudden
>> an evil, nasty thing in the Python world -- something that must
>> be banished at all costs (even if we have to change one of the
>> basic mathematical operators and break existing programs).
>> 
>> Are the rulers of the Python Kingdom going to ban all
>> polymorphism?  I thought it was one of the _strengths_ of
>> Python, and here we are trying to stamp it out!
>
>The different behaviour of "/" on floats and ints isn't
>polymorphism, it's overloading. Two different operations.
>Closely related, of course, but different. Generally
>"polymorphism" is reserved for when what's being done
>is "the same thing" in both cases.

It *is* the same thing in both cases - float division is nothing more
than a logical extension of integer division. Even mathematicians know
that ;-)




More information about the Python-list mailing list