Division considered un-Pythonic (Re: Case-sensitivity: why -- or why not? (was Re: Damnation!))

piet at cs.uu.nl piet at cs.uu.nl
Fri Jun 2 05:36:53 EDT 2000


>>>>> Greg Ewing <greg at cosc.canterbury.ac.nz> (GE) writes:

GE> Currently, Python provides no way for you to directly specify
GE> which one you want -- instead, it uses a heuristic based on the
GE> run-time types of the arguments. This clearly violates the principle
GE> of not trying to guess what the programmer meant. Therefore, it
GE> is un-Pythonic. QED.

I want to add another reason for a/b to mean floating division:

As it is now in Python, you can have a==b and c==d both being true, but
a/c==b/d being false. Which would be a bad surprise for most people.
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: Piet.van.Oostrum at freeler.nl



More information about the Python-list mailing list