by saco · 6y ago · 0 comments
Also checking for environments is done weirdly, why not use
if 'ENV' not in os.environ:
instead of
ENV = os.environ.get("ENV", None)
if ENV is None:
Now, it’s not really an issue here with environment variables. But in general, doing assignment and then walking through the cases is safer.
Also it's a bit better from the performance perspective (but not that it also matters in this case).
Then why mention it?
Why do you say that? It looks like it can handle any number of environments to me.