If this is by design and it optimizes for simplicity and easy interoperability with C, why would you assess its quality as 'good software' based on criteria that are non-goals?
Of course, "good" and "bad" are relative. If you don't care about performance then there's nothing wrong with CPython.
I mean one doesn't need more than:
>>> exit
Use exit() or Ctrl-D (i.e. EOF) to exit
to see. They have that special handling, but they still don't want to let you out, because... IMO, they just want to be annoying.When a solution could be something like:
Note: exit() is needed in scripts. In this prompt Ctrl-D (i.e. EOF) can also be used.
Exiting.I generally agree with your overall sentiment, but I think it's important to note that the behavior is _not_ special handling; it's just the normal `repr` behavior at the REPL, where `exit` is an object like any other, and `repr(exit)` is that message.
Python has a lot excuses about the need to remain "consistent" but the reality isn't so:
>>> x = open( "/tmp/whatever123", "w" )
>>> close( x )
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'close' is not defined. Did you mean: 'cosh'?
...
>>> x.close()
>>>
>>> x = "tttt"
>>> x.len()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
...
>>> len( x )
4