2 ms·
Thanks for this, it never occurred to me it used __repr__ for the message. I just added this to my .pythonrc exit.__class__.__repr__ = lambda _: exit()
by hiccuphippo 3y ago
Thanks for this, it never occurred to me it used __repr__ for the message. I just added this to my .pythonrc
exit.__class__.__repr__ = lambda _: exit()
quit = exit
Edit, you also need this in your bashrc:
export PYTHONSTARTUP=~/.pythonrc