PyCon Portugal 2025

Understanding and expanding Python: hand-on experience with the Python internals
2025-07-26 , Workshops 2

Understanding and expanding Python: hand-on experience with the Python internals


On this tutorial you will learn to:

  • Explore the core of the standard Python implementation
  • Modify the interpreter by adding new functions
  • Extend Python with C, Rust, and Zig.

The session will be a combination of a theoretical introduction of the topics, followed by a hand-on experience on each step.

Here is an outline of what will be done:

  • Navigating CPython (short presentation)
  • Setting up a development environment
  • Compiling CPython from source
  • Adding a free function to the interpreter
  • Adding a new method to a Python container (list or set)
  • Extending CPython (short presentation)
  • Minimal C-extension for "Hello World"
  • Minimal Rust, and Zig extensions for "Hello World",
  • Create a new extension replacing Python functionality with C, Rust and Zig.

Audience Level:

Intermediate

What are the main topics of your talk?:

CPython, Extensions, Language Interoperability

Cristián is is a serial conference and community organizer in many countries, and participates in different initiatives like the translation of the Python documentation into Spanish, PyLadies Berlin & Con, PyPI moderation, and a few more. He is one of the coordinators of the Python en Español initiative, that aims to gather all the Spanish speaking python communities in one place. Due to his contributions, he got awarded a PSF Fellowship in 2021 and got elected to the PSF Board of Directors in 2024. His day job is at The Qt Company, working as a team lead of the Qt for Python (PySide) project, and Qt Core (Berlin).