> *scratches head* How do you break an outer loop without breaking the
> inner loop? What happens?

Finish running the inner, then breaking the outer. Instead of breaking
inner and outer.

for i in outer:
    bk = False
    for j in inner:
         if cond:
             bk = True
    if bk:
       break


vs

for i in outer:
    bk = False
    for j in inner:
         if cond:
             bk = True
             break # this.
    if bk:
       break

Sorry if I'm mis expressing myself.

-- 
M

On Fri, Mar 3, 2017 at 10:52 AM, Chris Angelico <ros...@gmail.com> wrote:
> On Sat, Mar 4, 2017 at 5:50 AM, Matthias Bussonnier
> <bussonniermatth...@gmail.com> wrote:
>> Thanks, I think it does make sens, I'm going to guess,
>> outerloop.brk(inners=True) might also be helpful if you have more
>> inners loops. I think that implicitely breaking inner ones might
>> not always be the right thing to do so having a way to not break
>> inner ones does make sens.
>>
>
> *scratches head* How do you break an outer loop without breaking the
> inner loop? What happens?
>
> ChrisA
> _______________________________________________
> Python-ideas mailing list
> Python-ideas@python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to