PEP0238 lament
David Eppstein
eppstein at ics.uci.edu
Sun Jul 22 19:27:32 EDT 2001
In article <mailman.995839419.19134.python-list at python.org>,
"Tim Peters" <tim.one at home.com> wrote:
> A user trying e.g. velocity(3, 2) is simply going to be
> surprised -- as countless newbies have testified on c.l.py over the years.
My intuition is that the users who will be surprised that 1/2 = 0 are the
same ones who would be bitten by roundoff-error bugs if 1/2 = 0.5.
Result: buggier code since the errors are less obvious.
If you have a routine "velocity" in which it doesn't make sense to do
integer truncation, and it doesn't coerce its args to float by adding 0.0,
that's also a bug.
--
David Eppstein UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/
More information about the Python-list
mailing list