3 ms·
The enormous downside to this approach is that once you want to load a json file dynamically, e.g. with a filename that comes from a dynamic string, you're stuc
by amelius 11y ago
The enormous downside to this approach is that once you want to load a json file dynamically, e.g. with a filename that comes from a dynamic string, you're stuck and you have to come up with a completely different approach and rewrite your code.
- njharman 11y agoNot correct. Like many things in Python import is actually just syntactic sugar for a dunder function. https://docs.python.org/3/library/functions.html#__import__ https://docs.python.org/3/library/functions.html#__import__