PEP0238 lament

Erik Max Francis max at alcyone.com
Sun Jul 22 20:57:45 EDT 2001


Moshe Zadka wrote:

> Be sure to tell math.cos that...it has been "silently" turning
> integers
> into floats for years.

Sure, but that's something different.  The domain of math.cos (and so
on) is floats, not ints, so if you pass it an int you very sensibly get
coercion to an float, because that's what you must have really meant.

That's quite different from the current case, where we're talking about
an operation that will return different types depending on the inputs. 
I don't see any good reason to change the current behavior; / means
division over the types that are passed in.  If you pass in floats, you
want float division.  If you pass in ints, you want integer division.

> Err.....problem with the URL?.

Sorry, lazily pasted something into my .sig database.  It was meant to
be:

	http://www.alcyone.com/max/lang/esperanto/

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ When the solution is simple, God is answering.
\__/ Albert Einstein
    REALpolitik / http://www.realpolitik.com/
 Get your own customized newsfeed online in realtime ... for free!



More information about the Python-list mailing list