Hacker News new | ask | show | jobs
by bvisness 907 days ago
Yes, I completely agree. If you want to teach the user the rules, then you follow the rules. The problem with the Python example is that they DID special-case it, but in an unhelpful way.
2 comments

The special case is actually less a special case than you'd expect. It's "just" a python object that does some slightly funky things when turned into a string[0]. Making plain `exit` actually exit would mean triggering it accidentally could get too easy or would need a special case in the interpreter itself.

[0] https://github.com/Source-Python-Dev-Team/Source.Python/blob...

How is it unhelpful? It literally tells what to do.

Is it too hard to write exit() or press Ctrl+D after having incorrectly entered exit?