diff --git a/resources/examples/project1/src/moduleWithClasses.py b/resources/examples/project1/src/moduleWithClasses.py new file mode 100644 index 0000000..d0ce3aa --- /dev/null +++ b/resources/examples/project1/src/moduleWithClasses.py @@ -0,0 +1,30 @@ +def function_with_class_inside(): + class ClassInFunction: + def __init__(self): + self.varInClassInFunction = False + + c = ClassInFunction() + return c.__dict__ + + +print(function_with_class_inside()) + + +class ClassWithClasses: + class ClassInClass: + def __init__(self): + self.varInClassInClass = 3 + + print(ClassInClass()) + + def __init__(self): + class ClassInMethod: + def __init__(self): + self.varInClassInMethod = 5 + + print(ClassInMethod().varInClassInMethod) + self.varInClassWithClasses = 4 + + +c = ClassWithClasses() +print(c.__dict__) diff --git a/resources/examples/project1/src/root/subpackage1/__init__.py b/resources/examples/project1/src/root/subpackage1/__init__.py index 1a96b86..7ffe821 100644 --- a/resources/examples/project1/src/root/subpackage1/__init__.py +++ b/resources/examples/project1/src/root/subpackage1/__init__.py @@ -4,4 +4,4 @@ class ClassInSubpackage: def __init__(self): - self.varInClassInSubpackage = True + self.varInClassInSubpackage = True \ No newline at end of file