On Fri, Dec 4, 2020 at 12:25 AM Jonathan Fine <jfine2...@gmail.com> wrote: > > Hi Jonatan > > Please consider > for a in aaa: > for b in bbb: > if condition(a, b): > break > KEYWORD: > break > where KEYWORD is like else, but with the opposite semantics. I think this > does exactly what you asked for, in your example. >
well... uhhh.... Technically you can do that already.... for a in aaa: for b in bbb: if condition(a, b): break else: continue # We didn't break from b, so continue a break # We did break b, so break a But I don't think anyone's actually doing that :) ChrisA _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/DV2G3OVLINZTXAOHF5WSD5BE2T5VNZIP/ Code of Conduct: http://python.org/psf/codeofconduct/