Talk

Understanding Python from the inside: C concepts to dive into CPython fearless

LanguageEnglish
Audience levelAdvanced
Elevator pitch

CPython is the standard Python implementation that most of us use on a daily basis. As the name states, it’s written (mostly) in C, a language that might not be too familiar to all Python developers. The objective of this talk is to motivate people to start being involved in the core of Python.

Abstract

Everyone is happy with what Python 3.13 and the future 3.14 is bringing to the Python ecosystem, but in case you haven’t heard already of the improvements, most of them were made at the core of CPython to affect the interpreter.

It is very probable that many people out there, have ideas that can help Python to be better, but for that, you would need to dive into the CPython code at some point, and possibly perform modifications in C.

A subset of the API is indeed written in Python, but most of the other crucial core components are written in C - and with that, many people might not know C so well. The main building block of the internals, the PyObject, is a particular C-structure with many details and components that are worth studying, similarly, basic functions Python programmers use intensively like the print function, lists, dictionaries, etc - have C at their core.

The main objective of this talk is to motivate people to start being involved in low-level languages that make Python better, mainly not being afraid into picking up a bit of C knowledge to continue improving the core of CPython, and the many solutions out there that allow you to optimize the code, bindings, and why not, the creation of the ‘next’ blazing fast and performant module that will improve many peoples lives.

After this talk, you will be able to modify Python’s functionality from its core, add new API, create your new C-based Python modules, and more. Some ideas of C would be good, but not necessary.

TagsCompiler and Interpreters, Language and features
Participant

Cristián Maureira-Fredes

Cristián is a PSF fellow and recently elected to the PSF Board of directors. He is currently working at The Qt Company as Sr. R&D Manager, in charge of the Qt Core (Berlin) and Qt for Python teams, from which he has been part of the development team for more than 6 years. In his spare time, he is a serial conference and community organizer in many countries, and participates in different initiatives like the translation of the Python documentation into Spanish, PyPI moderation, and others related to Open Source.