News for hackers. Stuff that matters.
Re:How Many Lines of C It Takes to Execute a and B in Python? by monoprotic on Monday December 11, 2023 @01:17PM (#38603269)
There has been discussion of this change a few times, e.g. https://bugs.python.org/issue44603

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.

Re:How Many Lines of C It Takes to Execute a and B in Python? by acqq on Wednesday December 13, 2023 @08:58AM (#38627402)
Whoever types exit in REPL will never care what "repr(exit)" does.

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