Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If the `exit` variable were set to a string, `exit()` would be an error because you can't use `()` on strings. `exit` is a callable whose `__str__` method returns that message.

Note that this isn't specific to the REPL. Running `print(exit)` in a Python script will print the same message.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: