From e9b143427e39059d051f8cea5014ade6b6c1821e Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Wed, 13 Nov 2024 16:15:21 +0100 Subject: [PATCH] [test project] Add shadowed class --- .../project1/src/root2/moduleWithShadowing.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/resources/examples/project1/src/root2/moduleWithShadowing.py b/resources/examples/project1/src/root2/moduleWithShadowing.py index 565a543..b74604a 100644 --- a/resources/examples/project1/src/root2/moduleWithShadowing.py +++ b/resources/examples/project1/src/root2/moduleWithShadowing.py @@ -6,4 +6,20 @@ class shadowedName: def shadowedName(): - print("I'm the last one so I win") \ No newline at end of file + 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__) \ No newline at end of file