tests: Add another test for break-from-for-loop.

This commit is contained in:
Damien George 2014-05-31 16:56:15 +01:00
parent ff8da0b835
commit 049a01d148
1 changed files with 12 additions and 0 deletions

View File

@ -13,3 +13,15 @@ def foo():
i -= 1 i -= 1
foo() foo()
# break from within nested for loop
def bar():
l = [1, 2, 3]
for e1 in l:
print(e1)
for e2 in l:
print(e1, e2)
if e2 == 2:
break
bar()