Files
codeql/python/ql/src/Variables/ShadowGlobal.py
2018-11-19 15:10:42 +00:00

11 lines
284 B
Python

var = 2 # Global variable
def test2():
def print_var():
var = 3
print var # Local variable which "shadows" the global variable
print_var() # making it more difficult to determine which "var"
print var # is referenced
test2()