• Open Daily: 10am - 10pm
    Alley-side Pickup: 10am - 7pm

    3038 Hennepin Ave Minneapolis, MN
    612-822-4611

Open Daily: 10am - 10pm | Alley-side Pickup: 10am - 7pm
3038 Hennepin Ave Minneapolis, MN
612-822-4611
CPython Explained: Your Guide to the Internals of CPython

CPython Explained: Your Guide to the Internals of CPython

Paperback

General Computers

Currently unavailable to order

ISBN13: 9798265074959
Publisher: Independently Published
Published: Sep 19 2025
Pages: 516
Weight: 1.93
Height: 1.04 Width: 7.50 Depth: 9.25
Language: English

Gain deep expertise in Python's internal architecture and unlock the ability to optimize, debug, and extend Python at its core. Discover how to navigate CPython's 400,000+ lines of C code with confidence, from downloading and compiling the source to implementing your own bytecode instructions and custom types.

You'll work with the fundamental structures that power every Python program, including PyObject hierarchies, memory management through PyMalloc, and the intricate workings of Python's garbage collector. Learn to trace how your Python code transforms from source to bytecode, then executes within the virtual machine's evaluation loop. You'll explore the implementation of core data types such as lists, dictionaries, and strings, understanding why they perform as they do and how to leverage this knowledge for optimization.

Through practical examples, you'll build custom C extension types, modify the Python REPL, and create custom bytecode instructions. You'll uncover the secrets behind Python's import system, exception handling, and advanced features such as generators, descriptors, and metaclasses. Each chapter combines theoretical understanding with hands-on implementation, ensuring you can apply your knowledge immediately.

Whether you're tracking down performance bottlenecks, developing high-performance extensions, or simply satisfying your curiosity about how Python really works, you'll gain the expertise to work confidently at Python's lowest levels.

What You Will Learn

Also in

General Computers