
Modules what a topic! We don't have this notion in ObjectScript, but it's a fundamental concept in Python. Let's discover it together.
What is a Module?
I see modules as an intermediate layer between classes and packages. Let see it by example.
A bad example :
# MyClass.py
class MyClass:
def my_method(self):
print("Hello from MyClass!")
When you try to use this class in another script, you would do:
# class_usage.py
from MyClass import MyClass # weird, right?
my_instance = MyClass()
my_instance.my_method()
Why this is a bad example?



.png)
.png)


