Hacker News new | ask | show | jobs
by joshuamorton 2961 days ago
Only if you iterate over a fixed-length iterable.

    [x for x in itertools.count()]
will never terminate.
1 comments

It will terminate as soon as it runs out of memory.
By this definition, python has a nice locally defined property that it will always terminate ;)
No; this will never-ever terminate:

    (x for x in itertools.count())