DEV Community

Aleksei Aleinikov
Aleksei Aleinikov

Posted on

🐍 Inside CPython 2025: What You Never Knew About Tuples

✅ Why len(t) is always instant (O(1))
♻️ How small tuples reuse memory through freelists
⚠️ Hidden mutability in C extensions (and how to demo it in Python)
🔐 Plans for making tuples truly immutable in the future
👉 Read this to understand Python’s internals like a pro!
https://medium.com/pythoneers/inside-cpython-2025-the-truth-about-tuples-memory-re-use-and-hidden-mutability-0dc53150c956

Top comments (0)