Pay securely with PayID. Select PayTo at Checkout.
Currently unavailable.
We don't know when or if this item will be back in stock.
Added to

Sorry, there was a problem.

There was an error retrieving your Wish Lists. Please try again.

Sorry, there was a problem.

List unavailable.
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet or computer—no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera, scan the code below and download the Kindle app.

QR code to download the Kindle App

  • CPython Internals: Your Guide to the Python 3 Interpreter

Follow the author

Get new release updates via the Kindle app & improved recommendations.
Something went wrong. Please try your request again later.

CPython Internals: Your Guide to the Python 3 Interpreter Paperback – 5 May 2021

4.6 out of 5 stars (190)

Get your guided tour through the Python 3.9 interpreter: Unlock the inner workings of the Python language, compile the Python interpreter from source code, and participate in the development of CPython.

Are there certain parts of Python that just seem like magic?

This book explains the concepts, ideas, and technicalities of the Python interpreter in an approachable and hands-on fashion.

Once you see how Python works at the interpreter level, you can optimize your applications and fully leverage the power of Python.

By the End of the Book You’ll Be Able To:

  • Read and navigate the CPython 3.9 interpreter source code. You’ll deeply comprehend and appreciate the inner workings of concepts like lists, dictionaries, and generators.
  • Make changes to the Python syntax and compile your own version of CPython, from scratch. You’ll customize the Python core data types with new functionality and run CPython’s automated test suite.
  • Master Python’s memory management capabilities and scale your Python code with parallelism and concurrency.
  • Debug C and Python code like a true professional. Profile and benchmark the performance of your Python code and the runtime.
  • Participate in the development of CPython and know how to contribute to future versions of the Python interpreter and standard library. How great would it feel to give back to the community as a “Python Core Developer?”

With this book you’ll cover the critical concepts behind the internals of CPython and how they work with visual explanations as you go along.

Each page in the book has been carefully laid out with beautiful typography, syntax highlighting for code examples.

About the Author:

Anthony Shaw is a CPython contributor and a PyCon speaker. He has a B.Sc. in Computer Science and over 8 years of experience working with Python. Anthony is also a Fellow of the Python Software Foundation and member of the Open-Source Apache Foundation.

What Python Developers Say About The Book:

“It’s the book that I wish existed years ago when I started my Python journey. [...] After reading this book your skills will grow and you will be able solve even more complex problems that can improve our world.”

— Carol Willing, CPython Core Developer & Member of the CPython Steering Council

“CPython Internals is a great (and unique) resource for anybody looking to take their knowledge of Python to a deeper level.”

— Dan Bader, Author of Python Tricks

“There are a ton of books on Python which teach the language, but I haven’t really come across anything that would go about explaining the internals to those curious minded.”

— Milan Patel, Vice President at (a major investment bank)

“I can recommend CPython Internals to anyone who wants to get going with hacking on CPython.”

— Guido van Rossum, Creator of Python

Product details

  • ASIN ‏ : ‎ 1775093344
  • Publisher ‏ : ‎ Real Python (realpython.com)
  • Publication date ‏ : ‎ 5 May 2021
  • Language ‏ : ‎ English
  • Print length ‏ : ‎ 394 pages
  • ISBN-10 ‏ : ‎ 1781252548
  • ISBN-13 ‏ : ‎ 978-1775093343
  • Item weight ‏ : ‎ 558 g
  • Dimensions ‏ : ‎ 15.24 x 2.26 x 22.86 cm
  • Best Sellers Rank: 370,183 in Books (See Top 100 in Books)
  • Customer Reviews:
    4.6 out of 5 stars (190)

About the author

Follow authors to get new release updates, plus improved recommendations.
Anthony Shaw
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

Discover more of the author’s books, see similar authors, read book recommendations and more.

Customer reviews

4.6 out of 5 stars
190 global ratings

Top reviews from other countries

Translate all reviews to English
  • Daniel Dimmick
    5.0 out of 5 stars Writing code is one thing...
    Reviewed in the United Kingdom on 13 May 2021
    Format: PaperbackVerified Purchase
    knowing the why and the how is quite another
    Customer image
    Daniel Dimmick
    5.0 out of 5 stars
    Writing code is one thing...

    Reviewed in the United Kingdom on 13 May 2021
    knowing the why and the how is quite another
    Images in this review
    Customer image
  • Junejie Ruzol
    5.0 out of 5 stars mishandled by amazon
    Reviewed in Singapore on 23 August 2021
    Format: PaperbackVerified Purchase
    Customer image
    Junejie Ruzol
    5.0 out of 5 stars
    mishandled by amazon

    Reviewed in Singapore on 23 August 2021

    Images in this review
    Customer image
  • Allen Murphey
    5.0 out of 5 stars A tour behind the curtain...
    Reviewed in the United States on 19 May 2021
    Format: PaperbackVerified Purchase
    This guide is a very straightforward introduction and dive into the insides of how Python's core interpreter works. It did a very good job, for me, of introducing how Python works and thinks as well as open a lot of places to explore and learn more about how and why Python works like it does. Extremely glad I got this because it unlocked a lot of understanding for me. I still need to read it a few more times to really get my head around it all, but as a tour of the pieces and why they are there and how the work together, this is a very welcome onramp.
  • Tudor Plugaru
    5.0 out of 5 stars Well written!
    Reviewed in Germany on 7 June 2021
    Format: PaperbackVerified Purchase
    This is an excellent book and one that I was looking for. For long, I was planning to looking into how to contribute to CPython, and this book finally made me start.
  • José
    5.0 out of 5 stars Muito bom
    Reviewed in Brazil on 27 July 2024
    Format: PaperbackVerified Purchase
    Livro em inglês bem direto, explica bem todos os detalhes e sabendo só o inglês técnico já consegue ler e compreender bem os conceitos. Recomendo que tenha um pouco de conhecimento de python e construção de compiladores, para entender os termos como LL e outros.
    Report