News for hackers. Stuff that matters.
Re:Gmail password first character is case insensitive on mob... by vbezhenar on Saturday October 09, 2021 @08:47AM (#28809387)
It is result of calling `exit.__str__()`. This function could have called exit() itself instead.
Re:Gmail password first character is case insensitive on mob... by Taywee on Saturday October 09, 2021 @11:06AM (#28810478)
I'd say that would be much more surprising and unintuitive behavior just for the sake of slightly more convenient REPL use. I wouldn't want stringifying any function to automatically call it. What if you store the function somewhere and print it for debugging, and then have to figure out why your program keeps crashing when you try to just print a list of functions?

Besides, you usually have a more convenient exit available with Ctrl-D anyway.

Re:Gmail password first character is case insensitive on mob... by richard_todd on Saturday October 09, 2021 @12:36PM (#28811238)
Yeah but I can also say it’s a surprise to see instructions on how to exit the REPL when printing a list of functions. Honestly I think there should be no special case, and the REPL should print the “how to exit” text upon startup. As is, the user still has to guess ‘exit’ rather than ‘quit’ ‘abort’ ‘stop’ ‘bye’ etcetera to get the help text. (edit: actually they have the text on 'quit' as well)
Re:Gmail password first character is case insensitive on mob... by joebob42 on Saturday October 09, 2021 @11:40AM (#28810794)
Not for every function, just for exit.
Re:Gmail password first character is case insensitive on mob... by randallsquared on Saturday October 09, 2021 @12:07PM (#28810999)
The surprise is just not worth it.