You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ChocoPy/pa2-tests/core/decl_nonlocal_forward.py

11 lines
149 B

def outer() -> int:
def inner() -> int:
nonlocal x
x = 1
return x
x:int = 0
inner()
return x
print(outer())