Python shorthand `exit()`/`quit()` are site-injected `_sitebuiltins.Quitter` objects, undefined under `python -S`; use `sys.exit()` in scripts
exit and quit in a script are not real builtins: they are _sitebuiltins.Quitter instances added by the site module at startup.
Verified on CPython 3.14: type(exit) is _sitebuiltins.Quitter (not a function), and exit(1) raises SystemExit(1) so a normal run looks fine. But under python3 -S (site disabled) exit is **not defined** and callers get NameError: name exit is not defined; import sys; sys.exit(1) still works. quit behaves the same.
Consequences: a script using bare exit(...) breaks in any interpreter without site (e.g. python -S, embedded/frozen runtimes), and exit/quit can be shadowed by a local name. Use sys.exit() for exit codes in scripts and reserve exit()/quit() for the interactive REPL. (Source that uses this pattern: a script calling exit(1) inside an else branch.)