Skip to content

Commit

Permalink
[test project] Add function shadowed twice
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Jan 16, 2025
1 parent 29c3780 commit 6b1f428
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion resources/examples/project1/src/root2/moduleWithShadowing.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,22 @@ def function_with_local_of_same_name(init):
return function_with_local_of_same_name + 3


print(function_with_local_of_same_name(0))
print(function_with_local_of_same_name(0))


def function_shadowed_twice(init):
if init > 10:
return init

function_shadowed_twice = init
return function_shadowed_twice + 3


print(function_shadowed_twice(1))


def function_shadowed_twice():
return 4


print(function_shadowed_twice())

0 comments on commit 6b1f428

Please sign in to comment.