Python: Expand captured-variable test with default param

This commit is contained in:
Rasmus Wriedt Larsen
2023-07-06 17:21:29 +02:00
parent 14caaf119c
commit bea07002d3

View File

@@ -65,6 +65,19 @@ def to_inner_scope():
also_x = foo() # $ tracked
print(also_x) # $ tracked
def from_parameter_default():
x_alias = tracked # $tracked
def outer(x=tracked): # $tracked
print(x) # $tracked
def inner():
print(x) # $ MISSING: tracked
print(x_alias) # $tracked
return x # $tracked
also_x = outer() # $tracked
print(also_x) # $tracked
# ------------------------------------------------------------------------------
# Function decorator
# ------------------------------------------------------------------------------