(no title)
saila | 11 months ago
The Python standard library has a configparser module, which should be used instead of custom code. It's safer and easier than manual parsing. The standard library also has a tomllib module, which would be an even better option IMO.
cinntaile|11 months ago
necovek|11 months ago
Imagine code like this:
main.py:
Or two "commands", one importing utils and another not: they would non-obviously use different logging configuration.It gets even crazier: you could import utils to set the configuration, override it, but a second import would not re-set it, as module imports are cached.
Basically, don't do it and no unexpected, confusing behaviour anywhere.