[Python-Dev] re: division
Guido van Rossum
guido@python.org
Tue, 04 Apr 2000 11:43:49 -0400
> Random thought (hopefully more sensible than my last one):
>
> Would it make sense in P3K to keep using '/' for CS-style division
> (int/int -> rounded-down-int), and to introduce 'ö' for math-style
> division (intöint -> float-when-necessary)?
Careful with your character sets there... The symbol you typed looks
like a lowercase o with dieresis to me. :-(
Assuming you're proposing something like this:
.
---
.
I'm not so sure that choosing a non-ASCII symbol is going to work.
For starters, it's on very few keyboards, and that won't change soon!
In the past we've talked about using // for integer division and / for
regular (int/int->float) division. This would mean that we have to
introduce // now as an alias for /, and encourage people to use it for
int division (only); then in 1.7 using / between ints will issue a
compatibility warning, and in Py3K int/int will yield a float.
It's still going to be painful, though.
--Guido van Rossum (home page: http://www.python.org/~guido/)