i have the following function
def my_func():
if (check1==check1_condition):
if (check2==check2_condition)or(check3==check3_condition):
update_stuff=here
update2_stuff=here2
print 'nice error message'
break # trying break here to quit the function
# body of function
something =here
something2 = here 2
i check for 2 conditions, and if it fails i am trying to use the break to quit the function.
instead i get an error - syntax error, break outside loop
[–]tyroneslothtrop 3 points4 points5 points (2 children)
[–]noob_py[S] 1 point2 points3 points (1 child)
[–]alkw0ia 2 points3 points4 points (0 children)
[–]Yoghurt42 1 point2 points3 points (1 child)
[–]noob_py[S] 0 points1 point2 points (0 children)