Skip to content

Commit

Permalink
[test project] Add shadowed class
Browse files Browse the repository at this point in the history
  • Loading branch information
jecisc committed Nov 13, 2024
1 parent 78e2c2a commit e9b1434
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion resources/examples/project1/src/root2/moduleWithShadowing.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,20 @@ class shadowedName:


def shadowedName():
print("I'm the last one so I win")
print("I'm the last one so I win")


class ClassShadowedByOtherClass:
c_var_of_shadowed_class = True


print(ClassShadowedByOtherClass().__class__.__dict__)


class ClassShadowedByOtherClass:

def __init__(self):
self.i_var_of_shadowed_class = 3


print(ClassShadowedByOtherClass().__class__.__dict__)

0 comments on commit e9b1434

Please sign in to comment.