floating point division -- question

Greg Ewing see_reply_address at something.invalid
Wed Nov 27 23:57:48 EST 2002


Steve Holden wrote:

> But there's simply no way you could do that. If you'd used "/" for integer
> division then programs that used it with float operands would have broken.
> Either way it's a change in semantics, and that's why Guido has decreed the
> change will take so long.


The only way to avoid breakage altogether would have
been to introduce *two* new operators, one for
integer-only division and one for float-only,
and leave / alone completely.

Then we would have had a situation where the
most obvious symbol for division was the one
least recommended for use. That would have been
very ugly.

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg




More information about the Python-list mailing list