![Amazon prime logo](https://m.media-amazon.com/images/G/01/marketing/prime/new_prime_logo_RGB_blue._CB426090081_.png)
Enjoy fast, free delivery, exclusive deals, and award-winning movies & TV shows with Prime
Try Prime
and start saving today with fast, free delivery
Amazon Prime includes:
Fast, FREE Delivery is available to Prime members. To join, select "Try Amazon Prime and start saving today with Fast, FREE Delivery" below the Add to Cart button.
Amazon Prime members enjoy:- Cardmembers earn 5% Back at Amazon.com with a Prime Credit Card.
- Unlimited Free Two-Day Delivery
- Streaming of thousands of movies and TV shows with limited ads on Prime Video.
- A Kindle book to borrow for free each month - with no due dates
- Listen to over 2 million songs and hundreds of playlists
- Unlimited photo storage with anywhere access
Important: Your credit card will NOT be charged when you start your free trial or if you cancel during the trial period. If you're happy with Amazon Prime, do nothing. At the end of the free trial, your membership will automatically upgrade to a monthly membership.
Buy new:
$39.99$39.99
Ships from: Amazon.com Sold by: Amazon.com
Save with Used - Good
$36.00$36.00
$3.98 delivery February 24 - 25
Ships from: glenthebookseller Sold by: glenthebookseller
![Kindle app logo image](https://m.media-amazon.com/images/G/01/kindle/app/kindle-app-logo._CB668847749_.png)
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.
CPython Internals: Your Guide to the Python 3 Interpreter
Purchase options and add-ons
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
- ISBN-101775093344
- ISBN-13978-1775093343
- Publication dateMay 5, 2021
- LanguageEnglish
- Dimensions6 x 0.89 x 9 inches
- Print length394 pages
Frequently bought together
![CPython Internals: Your Guide to the Python 3 Interpreter](https://images-na.ssl-images-amazon.com/images/I/614iO74Ao-S._AC_UL116_SR116,116_.jpg)
Customers who viewed this item also viewed
Product details
- Publisher : Real Python (realpython.com) (May 5, 2021)
- Language : English
- Paperback : 394 pages
- ISBN-10 : 1775093344
- ISBN-13 : 978-1775093343
- Item Weight : 1.23 pounds
- Dimensions : 6 x 0.89 x 9 inches
- Best Sellers Rank: #331,112 in Books (See Top 100 in Books)
- #211 in Computer Programming Languages
- #317 in Python Programming
- #327 in Software Development (Books)
- Customer Reviews:
About the author
![Anthony Shaw](https://m.media-amazon.com/images/I/01Kv-W2ysOL._SY600_.png)
Discover more of the author’s books, see similar authors, read book recommendations and more.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonCustomers say
Customers find the book provides a deep dive into Python internals and technical insights. They find it interesting and open to exploration, like chess.
AI-generated from the text of customer reviews
Customers find the book provides basic Python knowledge and technical insights. They say it's a deep dive into the Python interpreter internals and covers how CPython works.
"...to advanced techniques, I can say this book provides the most Python fundamental knowledge to readers...." Read more
"A deep dive into the Python Interpreter internals - learn how to extend the language -..." Read more
"...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..." Read more
"Well written, interesting, detailed coverage of how CPython works, documenting all the main internal wheels...." Read more
Customers find the book interesting and engaging, opening new areas for exploration.
"...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...." Read more
"Well written, interesting, detailed coverage of how CPython works, documenting all the main internal wheels...." Read more
"...I doubt that I will really be able to use that knowledge, but it is interesting in the same way that chess puzzles are fun." Read more
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
- Reviewed in the United States on August 20, 2022Like me, if you are curious to learn in depth about Python compilation and execution methodology, this is the perfect book for you.
Having read 3 other books on Python fundamentals to advanced techniques, I can say this book provides the most Python fundamental knowledge to readers.
Only thing to keep in mind is that this is not a holistic reference book on Python, so do not expect it to cover about each data structure.
- Reviewed in the United States on September 9, 2022A deep dive into the Python Interpreter internals
- learn how to extend the language
- understand how source code is transformed into ASTs and bytecode
- deep dive into custom GIL optimizations
- some good performance tuning tips
I learned much from this book.
One possible improvement would be sequence diagrams describing the various internal code flows - easier to grok.
- Reviewed in the United States on May 19, 2021This 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.
- Reviewed in the United States on June 17, 2023Well written, interesting, detailed coverage of how CPython works, documenting all the main internal wheels.
I gave it a 4 because of a very annoying feature of the type - some of the text (strings and comments) is a very pale gray. Reserved words and numbers are also gray although not as pale. Both are very hard to read. They may be nicely colored and highlighted in the digital version. The value of putting them in a different font/color is unclear in such simple B&W examples.
Amazingly I downloaded the Python source following the directions and it built! My experience with other open source hasn't been so orderly.
- Reviewed in the United States on August 18, 2021Book arrived in good condition. Without any damage
- Reviewed in the United States on May 17, 2021excellent book to better understand python. Highly recommended!!!!
- Reviewed in the United States on May 17, 2021Short answer is: I was very impressed by this book because it is well written, focuses on Python 3.9, provides detailed instructions, and the code samples were tested across the three major operating systems: MacOS, Linux and Windows.
What it is not: If you are only wanting a primer on how to write a "C" extension for Python then this is not what this book is about.
What this book is: Step-by-step instructions explain how you can setup a "C" compiler (explaining MacOS, Linux and Windows setup separately), pull down the open-source "C" programs from the internet, and compile your own executable version of the enormously popular CPython interpreter. The book goes into great detail about the concepts and purposes behind what that "C" code does under the hood (lexing, parsing, etc). Anthony Shaw's book is aimed more at the very curious Python programmers who want to try out newer versions of the continually evolving CPython... perhaps to someday contribute to that effort, or maybe to insert their own custom fixes or enhancements... without having to wait for the next major release. This book is also aimed at the more serious programmers who are simply curious about what the CPython interpreter actually does internally, to gain an understanding of how Python's dictionary objects defined in the "C" source, and so on.
This book is written in a clear manner and will open up a new world for those seeking this kind of information! And just in case you're wondering: No, I don't work for the author or RealPython. I'm not being paid a dime for this recommendation.
--DT
- Reviewed in the United States on May 10, 2021This book is the real deal, a lifetime of entertainment as you explore the bowels of Python.
Any serious python programmer should consider working through this book. It will keep you
busy. The good news is the people who wrote it know what they are talking about and they
talk to you in a nice way. That makes a lot of difference. While I am here I should make a plug
for the realpython.com site. This book along with a lot of other great learning materials are
available there. Again, nice people who will take you where you're at and help you move
forward with your python programming skills.
Top reviews from other countries
-
JoséReviewed in Brazil on July 27, 2024
5.0 out of 5 stars Muito bom
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.
- HjortReviewed in Sweden on March 30, 2022
1.0 out of 5 stars Missing index makes an else good book more or less useless
The content of this book is great and is clearly a higher rating than one star. But a technical book without an index is considered incomplete and quite useless as a quick reference.
- Tudor PlugaruReviewed in Germany on June 7, 2021
5.0 out of 5 stars Well written!
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.
- Daniel DimmickReviewed in the United Kingdom on May 13, 2021
5.0 out of 5 stars Writing code is one thing...
knowing the why and the how is quite another
Daniel DimmickWriting code is one thing...
Reviewed in the United Kingdom on May 13, 2021
Images in this review
- Junejie RuzolReviewed in Singapore on August 23, 2021
5.0 out of 5 stars mishandled by amazon
Junejie Ruzolmishandled by amazon
Reviewed in Singapore on August 23, 2021
Images in this review