|
|
|
|
|
by 82716f12
314 days ago
|
|
> I agree, which is why you should design your modules correctly and import only the stuff you need. How do you achieve this without making gazillions of modules, where each module has just a few stuff? Are you saying just use local import everywhere? |
|
So when you do this
It doesn't do anything functionality, and you may only have some small top level things available for you, like bigmodule.config, or bigmodule.logging.Then, you have your big initializer code in bigmodule.financedata. But the stuff you need for running scripts is in bigmodule.scripts.
So when you write
This code will take a while.But if you write
This will load fast.You don't need to have gazillion modules, just good organization. Also, in general, its a good practice to gate intensive compute/network operations behind an explicit function you need to call.
Also thank you for focusing the convo on the tech stuff instead of repeating finance bro myths