3 ms·
>>> exit Use exit() or Ctrl-D (i.e. EOF) to exit > You know god damn well what I mean Python, so just do it instead of nitpicking me Python has no idea th
by orf 11y ago
>>> exit
Use exit() or Ctrl-D (i.e. EOF) to exit
> You know god damn well what I mean Python, so just do it instead of nitpicking me
Python has no idea that's what you mean.
>>> repr(exit)
'Use exit() or Ctrl-D (i.e. EOF) to exit'
It's just the exit function has a __repr__ that returns that. Why the hell would Python make just 'exit' exit the interpreter? That's unlike anything else in the language.
>>> print 4
SyntaxError: Missing parentheses in call to 'print'
This is a special case to help with the transition from 'print' to 'print()'. Should 'i 1' have a message saying a parenthesis is missing? I could mean 'i + 1', or 'i, 1'.