Files
codeql/python/ql/test/query-tests/Variables/undefined/captured.py
Rasmus Lerchedahl Petersen 9b7a20f4ad python: add example showing FP
2023-03-20 13:03:26 +01:00

15 lines
163 B
Python

#!/usr/bin/python
def topLevel():
foo = 3
def bar():
nonlocal foo
print(foo) # FP
foo = 4
bar()
print(foo)
topLevel()