Python: Show getCallableForArgument can have multiple results

This commit is contained in:
Rasmus Wriedt Larsen
2020-11-18 10:43:26 +01:00
parent abf2902a69
commit ab856d6c01
2 changed files with 16 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
def foo(foo_x): # $tracked
print("foo", foo_x) # $tracked
def bar(bar_x): # $tracked
print("bar", bar_x) # $tracked
if len(__file__) % 2 == 0:
f = foo
else:
f = bar
x = tracked # $tracked
f(x) # $tracked