Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while someCondition:
- alpha = True # alpha declared in while's scope
- for x in range(1, limit):
- if someOtherCondition:
- alpha = False # alpha modified in inner scope
- break
- if alpha: # I expect this alpha to refer to modified value from inner scope but it's always showing True
- doSomething(z)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement