Bálint is a user on x0r.be. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
Bálint @szbalint

Show me a better example of misguided paternalism:

>>> exit
Use exit() or Ctrl-D (i.e. EOF) to exit
>>> exit()
➜ ~

· Web · 2 · 3

(python REPL if you're wondering)

@szbalint that always drove me nuts.

"Let's specifically add lines of code to detect when a person types `exit` so we can scold them and tell them to type `exit()`"

@szbalint ah yes the Python repl: the only thing that makes Erlang's "let's just beep when someone enters an EOF char" policy look reasonable

@szbalint I understand _why_ it does what it does now, but I still think it could have been done better github.com/python/cpython/blob

@iks @szbalint This is a perfect example of one of those things that makes *perfect sense* until you think about it a while, then makes no sense at all, then makes perfect sense when you think about it more.

Languages often have some sort of command language in their repl, like GHC's ":foo" or OCaml's "#foo" commands. Python doesn't have one. So, you need to make it part of the language. And making it call a function when you just print something out Feels Wrong.