EuroPython 2025

Broken __slots__ are a silent performance killer—Let's fix them!
2025-07-18 , South Hall 2A

Using __slots__ on Python classes aims to boost performance, but it can backfire if misconfigured—a common and silent issue often caused by inheritance subtleties. Learn from real-world cases where these problems were found and fixed in major libraries (even the stdlib), undermining intended memory/speed gains.

This talk presents slotscheck, a tool enabling automated testing of __slots__ correctness within your CI/CD pipeline. Learn how to implement effective checks, apply lessons from real-world debugging and fixing, and ensure your use of __slots__ contributes positively to code quality and efficiency. Leave ready to diagnose and fix these silent bugs in your own projects.


Expected audience expertise:

Advanced

Originally trained as a civil engineer, I’ve spent the past 11 years immersed in the tech industry, working at both a startup and a large corporate. My expertise lies in Python, though I enjoy exploring languages like Rust. I’m passionate about writing maintainable code, getting to the heart of complex concepts, and sharing what I learn with others.