On 14 Apr 2006 06:11:38 -0700,
[EMAIL PROTECTED] wrote:

> what's the standard way for a "for" loop with float increments?

Use a while loop instead:

    f = initial_value
    while f <= final_value:
        process(f)
        f = f + increment

Note that there is no general guarantee that f will actually be
final_value; see also <http://docs.python.org/tut/node16.html>.

Regards,
Dan

-- 
Dan Sommers
<http://www.tombstonezero.net/dan/>
"I wish people would die in alphabetical order." -- My wife, the genealogist
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to