>>> exit
Use exit() or Ctrl-Z plus Return to exit >>> exit
Use exit() or Ctrl-Z plus Return to exitPython 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.
Besides, you usually have a more convenient exit available with Ctrl-D anyway.
Note that this isn't specific to the REPL. Running `print(exit)` in a Python script will print the same message.
I'd love to find (never looked...) a python3 repl where `print`, `dir`, `help` all behave like python2's `print`, since they're debug/lookup tools. It's rather often I'll open a terminal and want to check one of those things, and... typing () characters just adds significant effort (for lack of better description).
I always found Ruby's optional parenthesis to be annoying in stored code, but I gotta admit it's nice on the REPL.
$ bc -l
bc 1.07.1
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
exit
0
quit
Gets me everytime.