Message397462
I wonder if the middle ground here is to let it be a teachable moment, and to inform the user by having the string returned by __repr__ be a bit more descriptive. Currently, it is:
> Use exit() or Ctrl-Z plus Return to exit
I propose:
> exit is the function that closes Python when called. To call a Python function, add parenthesis! For example, "exit()".
To share a personal anecdote, Python was my first programming language. I can remember this specific case of REPL-stubbornness being instrumental in teaching me about referencing versus calling a function. Special cases cause confusion, and a shortcut that removes two characters at the expense of skirting past an essential understanding is not the right choice. The place we should be *most* careful about breaking language idioms are in the spots that are exposed to beginners and newcomers to the language. |
|
Date |
User |
Action |
Args |
2021-07-14 04:30:18 | jack__d | set | recipients:
+ jack__d, gregory.p.smith, mark.dickinson, eric.araujo, steven.daprano, veky, p-ganssle, pablogsal, FFY00, theacodes, tlalexander |
2021-07-14 04:30:18 | jack__d | set | messageid: <1626237018.34.0.196133316415.issue44603@roundup.psfhosted.org> |
2021-07-14 04:30:18 | jack__d | link | issue44603 messages |
2021-07-14 04:30:17 | jack__d | create | |
|