The rap against "while True:" loops
Marco Mariani
marco at sferacarta.com
Wed Oct 14 04:53:11 EDT 2009
Dennis Lee Bieber wrote:
> One thing to note is that "break" ONLY exits the innermost loop --
> Ada adds the confusion that one could define a label on the loops, and
> have the innermost use
> exit outer_label [when condition]
>
>
> THAT I find scary... Since you have to match the label name to
> something that occurs somewhere prior to the "exit", and THEN have to
> find the end of that loop.
But we have exceptions. And I know somebody, in other languages, thinks
it's a Best Practice to avoid using exceptions for flow control.
Thankfully, python programmers are less dogmatic, and use whatever makes
sense to use. I hope.
More information about the Python-list
mailing list