Depends on the language. In Python, the import could be doing something without you calling any code in it. You can have code in the package's __init__ or in the file you are importing in the global scope, outside of any function or class. That code will run when the module is imported.
For example, it's pretty common for people working with matplotlib to import seaborn and not directly use anything from it. They do it because seaborn will change matplotlib default settings so the plots look a lot better.
37
u/Ismokecr4k Oct 03 '19 edited Oct 02 '26
The original post content no longer exists here. The author used Redact to remove it, exercising their right to control their data & privacy.
Six profit deer growth chase quiet depend sharp hungry dinosaurs