Lysandros Nikolaou
Lysandros works as a Senior Software Engineer at Quansight, where he spends most of his time on CPython and the PyData ecosystem. He is a CPython core developer, specializing in the parser, the tokenizer and the REPL. He recently worked on supercharging f-strings in Python 3.12, the new REPL for Python 3.13, t-strings in Python 3.14 and introducing fast string ufuncs in NumPy 2.0. Currently, he's mostly dealing with improving support for free-threaded Python in the PyData ecosystem.
Session
Python dicts are everywhere! They back module namespaces, instance attributes, **kwargs, and of course actual dictionaries. But have you ever wondered how they work under the hood? And more importantly, what happens to them now that free-threaded Python is here?
In this talk, we'll start by exploring the internals of CPython's dict implementation: how hashing works, the compact table layout that gives you insertion order, and how lookups, insertions, and deletions actually play out in memory. Then we'll see what had to change for free-threading: how reads remain fast without acquiring locks, what the per-object lock is and when it kicks in, and why making a dict thread-safe is harder than it sounds.
Finally, we'll look at the ongoing effort to document CPython's thread-safety guarantees for built-in types and what the resulting documentation means for a Python developer writing concurrent code.
The audience will leave with a deep understanding of how Python's most important data structure works, how it's been adapted for a free-threaded world, and what they can (or can't) safely do with dicts across threads.