What are CPython's sub­inter­preters? a talk by Marcel Plch

Saturday, 15 June, 12:30 in Club

The Python interpreter exposes a rich C API that allows you to extend or embed it with a fast C code. This includes subinterpreters, which allow you the have (almost) separated environment for each interpreter inside a single process.

With these separated environments, you may have multiple Python applications running in a single process. If many instances are required to be launched, this may have significant both memory and performance benefits.

However, there are multiple ways to break the behavior of subinterpreters and even some extensions from the standard library are not subinterpreter-safe.

Let’s have a look at the ways subinterpreters are useful and what could make them better in the future.

This talk is aimed at advanced Pythonistas. While it might be interesting for beginners we recommend them to choose another talk.

Marcel Plch

I am a high school student and software engineer from Red Hat Python maintenance team in Brno.

In my free time, I like to learn new stuff and teach them to others. I also like to share skills that I consider a lot easier to gain when explained by someone else.

Besides Python, my favorite language is also C, which I like for its speed and simplicity (as in "simple in structure", rather than "simple to write").

I also like chatting about (mostly, but not just) computing and tech stuff, so feel free to stop by and have a word or two with me.

Dormouse759 Dormouse759

I also lead a workshop Extending CPython (sub­inter­preter friendly!)