|
|
|
|
|
by andrewaylett
899 days ago
|
|
Except they didn't -- the result of a statement is turned into a string, and the string is printed. There are standard ways of turning objects into strings, and the `__repr__` function on the `exit` object returns that string. If you call that object then it raises an exception that triggers a REPL to cleanly quit. The code is here: https://github.com/python/cpython/blob/3.12/Lib/_sitebuiltin... |
|