Understand and expand Python: a hands-on experience on Python internals
- Track:
- Python Core, Internals, Extensions
- Type:
- Tutorial
- Level:
- intermediate
- Duration:
- 180 minutes
Abstract
The majority of the new modules that we see out there including the word "performance" in their campaigns are Python modules with extensions in other languages. This has been very clear with languages like Rust, and C++, which has been the core of many popular modules in the recent years.
But how difficult is to extend CPython? and more importantly, what are the steps of doing it with other languages?
This tutorial aims to be a good starting point for people that wants to familiarize themselves with the CPython internal, and how to do extensions with languages like C, C++, Rust, and Zig, by developing a series of small exercises that will enable you to get more familiar with the processes.
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.
Some knowledge with C, C++, Rust or Zig is encouraged, but not required.