Author veky
Recipients FFY00, p-ganssle, pablogsal, steven.daprano, theacodes, tlalexander, veky
Date 2021-07-13.05:52:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> based on feedback it seems that almost everyone expects "exit" to exit

I don't, and I don't remember being asked.

Let me be clear: if exit were a Python keyword, then maybe I would expect that. Or at least, I could convince myself to expect that. But exit is _not_ a keyword, it is not even a builtin, and there is a _strong_ reason for that. One of Guido's many valuable insights about language design is that you shouldn't preclude other uses of names you find convenient for your builtins. See the last line of Zen of Python.

And yes, I _have_ used exit as a name for my objects (e.g. as a flag in Pygame, set exit = False at the beginning and exit = True somewhere in the loop when I find out that the game is over). Although I don't recall ever actually typing `exit` into Python REPL to inspect its value, I really think that scenario is plausible (for example, if a game exited prematurely, and I wanted to see whether exit was set to True prematurely, or there was some other reason), and it would _annoy me immensely_ if instead of showing me the status of the flag it would drop me out of Python.

In fact, you're proposing to use exit as a keyword, but lying about it to the users. If it were really so important, then it _should_ be a keyword, and at least I'd know that I can't use it for my variables anymore. (It's not the first time such a thing would happen. The same thing happened with `async` a few years ago.) But please don't introduce those "keywords just in a particular context", they are horrible from the perspective of usability.
Date User Action Args
2021-07-13 05:52:34vekysetrecipients: + veky, steven.daprano, p-ganssle, pablogsal, FFY00, theacodes, tlalexander
2021-07-13 05:52:34vekysetmessageid: <>
2021-07-13 05:52:34vekylinkissue44603 messages
2021-07-13 05:52:34vekycreate