exit
exit
exit
The era of pedantry is finally over:
Direct support for REPL-specific commands like help, exit, and quit, without the need to call them as functions.
FINALLY! This has always annoyed me. If you’re gonna go through all the trouble of identifying that I want to exit, just DO it.
The dev thought "I know exactly what you meant, but I still insist you to do it my way".
Same energy as "Option -h
not recognized; use --help
for the list of options".
Or more subtly, when the command uses BSD (nowadays Go) style single-dash args, so it wants -help
and not --help
.
I have a vivid memory when I was in first grade and asked my teacher if I can use the bathroom, and I got his bullshit response. I was a first grader, so I sat my ass back down and held it. Fuck this horse shit mentality.
Fine, if you're an adult, it's juvenile, but at that point people should understand the difference. Doesn't mean I won't lambast a MFer for being a pedantic prick though.
As an adult I'm asking nobody if I "may" use the bathroom. I might ask, "can I use YOUR bathroom" (notably not "may") or say "can you point me to the bathroom" because I am a human being with a right to access these facilities (Americans need not apply).
Teachers who feel the need to get one over on a child are pieces of shit. It teaches nobody anything except "adults are awful". Be nice to kids, you can fuck them up with something you don't think twice about.
What other lessons did you refuse to learn in school?
Too many to count, but I learned this lesson. I just struggled with nuance in gramer as a fucking 1st grader.
May I exit
People seriously don't use D to exit REPLs and shells? So much faster.
That just gave me the idea that it would be fun to inspect
exit
a little.Which led me down this path:
Okay, cool, the "Use exit() etc." blurb appears because it's the function's
repr
, and the string is assembled from itsname
andeof
properties.Now let's try to make our own:
Oh Python, you shouldn't have.
Beauty!
Obviously they need to make
exit
's repr method raise aSystemExit
Does gtfo() then work as expected?
Yup