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

The only reason I could think of this warning (which I have run across entirely too many times) was in case someone had a variable called 'exit'. Yet:

  >>> exit = True
  >>> exit
  True
  >>> exit()
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  TypeError: 'bool' object is not callable
The only way to then exit is Ctrl-D, but the shell will not prompt you to enter it!


> The only way to then exit is Ctrl-D

Nope.

  >>> __builtins__.exit()


Or Ctrl-Z (EOF) on Windows.




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

Search: