What arguments was Python called with?
SMRTR summary
A developer removed a complex Python hack from Werkzeug's reloader after Python 3.9 reached end-of-life. The original code solved a tricky problem: detecting whether Python was run with `python -m module` versus `python file.py` to avoid import conflicts. The elaborate workaround involved checking `__main__.__package__` and handling various edge cases, but Python 3.10's new `sys.orig_argv` replaced all that complexity with a single line.
SMRTR provides this summary for quick context. The original article belongs to lobste.rs.
Read the original article