Lazy-Loading Modules in Python
When I’m making a python package, I usually write an __init__.py which lifts the packages modules into the package namespace. Assume you have a package like this: my_package/ __init__.py module1.py module2.py module3.py If you leave the __init__.py blank, you cannot do: import my_package my_package.module1 This will result in an error that looks like: ————————————————————————— AttributeError…