2 ms·
Nobody said anything about repr()? It's the REPL's job to handle this case and provide a good UX.
by zarzavat 3y ago
Nobody said anything about repr()? It's the REPL's job to handle this case and provide a good UX.
- eurleif 3y ago`exit` is simply a function. The text it displays at the REPL now is simply the result of calling `repr()` on that function. Adding a special case would make the REPL more complicated, and would make it inconsistent. Technically it wouldn't even be an REPL anymore, since it wouldn't be doing the "P" part for certain objects. And the special case would break tools that rely on the REPL behaving consistently.