by wcoenen · 5y ago · 0 comments
Python functions are invoked with parenthesis, while typing a name without parenthesis retrieves the content of a variable. The Python CLI helpfully sets the "exit" variable to that string so that you don't get a confusing NameError when you make this mistake.
Note that this isn't specific to the REPL. Running `print(exit)` in a Python script will print the same message.
Besides, you usually have a more convenient exit available with Ctrl-D anyway.