Easy way to keep counting up infinitely

Posted by Andrew Alexander on Stack Overflow See other posts from Stack Overflow or by Andrew Alexander
Published on 2012-07-11T02:43:49Z Indexed on 2012/07/11 3:15 UTC
Read the original article Hit count: 178

Filed under:

What's a good way to keep counting up infinitely? I'm trying to write a condition that will keep going until there's no value in a database, so it's going to iterate from 0, up to theoretically infinity (inside a try block, of course).

How would I count upwards infinitely? Or should I use something else?

I am looking for something similar to i++ in other languages, where it keeps iterating until failure.

© Stack Overflow or respective owner

Related posts about python