The rap against "while True:" loops
Paul Rubin
http
Tue Oct 13 18:22:11 EDT 2009
Mensanator <mensanator at aol.com> writes:
> And I'm not saying John nor the OP should stop using what works for
> them. But there are certainly valid reasons for "don't use while
> True" to be on the "Best Practices" list.
>
> After all, how many times hve you put 'break' in a loop
> comprehension?
<http://okmij.org/ftp/Streams.html#enumerator-stream>:
Towards the best collection traversal interface
"We present a design of the overall optimal collection traversal
interface, which is based on a left-fold-like combinator with
premature termination. The design has been implemented and tested in
practice."
More information about the Python-list
mailing list