-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Blocker 🙅Blocks the next releaseBlocks the next releaseC: used-before-assignmentIssues related to 'used-before-assignment' checkIssues related to 'used-before-assignment' checkFalse Negative 🦋No message is emitted but something is wrong with the codeNo message is emitted but something is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementationUnreleased
Milestone
Description
def nonlocal_in_outer_frame_ok(callback, condition_a, condition_b):
def outer():
nonlocal callback
def inner():
if condition_a:
def inner2():
callback() # possibly-used-before-assignment?
inner2()
else:
if condition_b:
def callback():
pass
inner()
outer()
we should probably raise a message here?
Originally posted by @zenlyj in #10034 (comment)
zenlyj
Metadata
Metadata
Assignees
Labels
Blocker 🙅Blocks the next releaseBlocks the next releaseC: used-before-assignmentIssues related to 'used-before-assignment' checkIssues related to 'used-before-assignment' checkFalse Negative 🦋No message is emitted but something is wrong with the codeNo message is emitted but something is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementationUnreleased