[Python-ideas] Break multiple loop levels

Christopher Barker pythonchb at gmail.com
Sat May 11 18:15:24 EDT 2019


judicious use of the for loop "else" may help here, too -- I know I often
forget it's there.

-CHB


On Sat, May 11, 2019 at 2:26 PM Adrien Ricocotam <ricocotam at gmail.com>
wrote:

>
>
> > On 11 May 2019, at 23:20, David Mertz <mertz at gnosis.cx> wrote:
> >
> > I don't love the 'break break' syntax idea. But I find myself wanting to
> break out of nested loops quite often. Very rarely could this be
> transformed to an 'itertools.permutation' de-nesting, albeit perhaps more
> often than I actually do that.
> >
>
> Do you have an example of such loops ?
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>


-- 
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20190511/f8abcb7c/attachment-0001.html>


More information about the Python-ideas mailing list