[Python-ideas] Break multiple loop levels

Paul Moore p.f.moore at gmail.com
Sat May 11 13:38:57 EDT 2019


On Sat, 11 May 2019 at 18:22, haael <haael at interia.pl> wrote:
> Breaking out from many loops at once is a common practice

Do you have evidence for this? In my experience, it's very rare
(although I concede it would be *occasionally* convenient).

In most cases where I'd consider breaking out of multiple levels of
nested loop, I've tended to find that it's probably more readable to
refactor the code to use a generator, or something like that.
Paul


More information about the Python-ideas mailing list