Python 3.13: The most anticipated updates to the Python REPL shell
Non members can click here to read the story!
How many times have you tried typing exit
in the Python REPL shell, only to see that annoying error message pop up:
"Use exit() or Ctrl-D (EOF) to exit"?
It’s so frustrating! I’ve done it countless times. I get it—exit()
is a function and you need to call them correctly, but it just doesn’t always stick in my head.
And don’t even get me started on typing out a function in the shell and then needing to modify it. You either have to retype the whole thing or keep hitting the UP
key to edit. It’s a pain!
A solution in New version of Python —v 3.13
Let’s sneak into the changes that Python 3.13 version brings about the interactive shell.
You don’t need to call them as functions — just use help, exit, or quit.
Yes! If you want to exit the Python shell, you can simply type exit
or quit
. There is no need to call them as functions like exit()
or quit()
To view the help, just type help
instead of help().
You can also use the shortcut by pressing F1
key.
Multi line editing
Python shell supports multi line editing from v3.13. A block of code (class, function, loops, etc.) can be edited in a single stretch. Now, REPL treats…