3 ms·
>Clearly I have no idea what I'm doing. Doesn't look like that from over here. Many times the difference between failure and the magic spell working is 1 more
by bob1029 6y ago
>Clearly I have no idea what I'm doing.
Doesn't look like that from over here.
Many times the difference between failure and the magic spell working is 1 more late night iteration. In this specific case you are working against some difficult constraints that are deep in the language. That said, there is almost always a way to side-step a problem altogether. You may find that one workaround is to amortize the startup concern over time - I.e. reorient the problem domain so you only have start the python process once a day. Or, find a way to defer loading of required components until the runtime actually needs them.
- necovek 6y agoIt is trivial in Python to move towards a lazier way to load modules on first use, it's just not idiomatic or too readable (thus we do top-level imports).