HomeData scienceThe New Interactive Interpreter in Python 3.13 | by Anna Astori |...

The New Interactive Interpreter in Python 3.13 | by Anna Astori | Oct, 2024


The way it can pace up your coding and experimentation

Photograph by Waldemar on Unsplash

Python 3.13 was launched just some days in the past and it comes with a major variety of adjustments. Among the bigger ones embody taking greater steps in direction of eradicating the GIL, including an experimental Simply-In-Time (JIT) compiler, and bettering static typing. There has additionally been an entire number of extra delicate characteristic additions and removing of fairly a couple of of so-called “useless batteries”. Plenty of these enhancements mixed are getting Python nearer to the aim of turning into a competitively quick language.

Nonetheless, in case you are do a whole lot of experimentation and prototyping in your day-to-day work or you might be simply studying Python, the largest change you’ll likely discover and respect from the beginning is the brand new interactive shell — the so-called REPL.

So what’s been improved within the REPL?

  1. Constructed-in Syntax Highlighting

Beforehand, we might depend on third-party instruments or particular IDEs to get syntax highlighting within the terminal REPL. With Python 3.13, syntax highlighting is now obtainable natively. This makes studying and debugging code immediately within the REPL a lot simpler, particularly throughout longer classes:

>>> def greet(identify):
... return f"Good day, {identify}!"
...
>>> greet("Alice")



Supply hyperlink

latest articles

Lightinthebox WW
ChicMe WW

explore more