None???
David Eppstein
eppstein at ics.uci.edu
Mon Sep 22 11:31:35 EDT 2003
In article <4l4umv4kl82d8t5td29in26cfb57ctb6h0 at 4ax.com>,
Tim Rowe <tim at remove_if_not_spam.digitig.co.uk> wrote:
> >Arguably, any code that uses / with integer arguments is now buggy,
> >because it will produce different results in different Python versions.
> >You should either use // (integer division) or force floating point
> >division (e.g. by changing the expression to income*percent/100.0).
>
> What's the behaviour of "from __future__ import division" on versions
> that are too old to know about the future of division?
A nice error message.
So that's another good way to go.
--
David Eppstein http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science
More information about the Python-list
mailing list