A really bad idea.

Greg Ewing see_reply_address at something.invalid
Mon Nov 18 18:16:03 EST 2002


James J. Besemer wrote:

> It's ostensibly the reason why 
> integer division was redefined to produce a real result -- because naive 
> users might be "confused" by a truncated integer result.


No, that's not the reason. The reason is that the
combination of dynamic typing with an operator that
does different things on two closely-related types
is an accident waiting to happen. Even if you're
fully aware of the potential problem, it can
still trip you up.

I believe Guido did the right thing by changing this.

-- 
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