In article 
<[EMAIL PROTECTED]>,
 John Machin <[EMAIL PROTECTED]> wrote:

<snip>
> 
> You obviously haven't tried float(n / m), or you wouldn't be asking.

True, it was a very silly idea.

> Most legible and slowest first:
> 1. float(n) / float(m)
> 2. n / float(m)
> 3. 1.0 * n / m

> Recommendation: go with (2) until you find you've got a program with
> a real speed problem (and then it probably won't be caused by this
> choice).

I had actually used n / float(m) at one point; somehow the above struck 
me as an improvement while I was writing the message. Thanks for the 
reality check.

-- 
Odysseus
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to