On Sun, May 12, 2019 at 3:45 AM Christopher Barker <[email protected]>
wrote:
>
> judicious use of the for loop "else" may help here, too -- I know I often
forget it's there.
yeah, I often do this when I want to break twice but this method only
supports breaking twice at once but this doesn't support break once
and break twice semantics simultaneously.
```
for x in range(n):
for y in range(m):
break
else:
continue
break
```
On Sun, May 12, 2019 at 3:45 AM Christopher Barker <[email protected]>
wrote:
> 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 <[email protected]>
> wrote:
>
>>
>>
>> > On 11 May 2019, at 23:20, David Mertz <[email protected]> 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
>> [email protected]
>> 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
> _______________________________________________
> Python-ideas mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
--
Regards
Srinivas Devaki
Software Developer at Zomato, New Delhi
Phone: +91 9491 383 249
Telegram: @eightnoteight
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/