TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Python's Innards: Introduction (2010)

167 pointsby johnsonjoover 4 years ago

6 comments

nerdponxover 4 years ago
I highly recommend this talk by Armin Ronacher as an accompaniment (or prologue, or epilogue) to the article: &quot;How Python was shaped by leaky internals&quot;, <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=qCGofLIzX6g" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=qCGofLIzX6g</a>
tadkarover 4 years ago
There&#x27;s also this wonderful book [1] covering similar ground for Ruby. An extract from a review gives a flavour:<p>&quot;Ruby Under a Microscope&quot; does something fairly ambitious. It attempts to write a system internals book in a language that non computer scientists can readily understand. While there are numerous code snippets and examples to try and examine, the ability to look at the various Ruby internals and systems and see how they fit together can be accomplished by someone with general skills and basic familiarity with programming at the script level (which for many of us is as far as we typically get). An old saying says you can’t tell where yo hare going if you don’t know where you’ve been. Similarly, we can’t expect to get the most out of languages like ruby without having a more clear idea what’s happening under the hood. It’s entirely possible to work with Ruby and never learn some of this stuff, but having a guide like &quot;Ruby Under a Microscope” opens up a variety of avenues, and does so in a way that will make the journey interesting and, dare I say it, even a little fun.<p>[1] <a href="https:&#x2F;&#x2F;www.amazon.com&#x2F;Ruby-Under-Microscope-Illustrated-Internals&#x2F;dp&#x2F;1593275277" rel="nofollow">https:&#x2F;&#x2F;www.amazon.com&#x2F;Ruby-Under-Microscope-Illustrated-Int...</a>
评论 #24501151 未加载
unrequitedover 4 years ago
For those interested, take a look at this series.<p><a href="https:&#x2F;&#x2F;eli.thegreenplace.net&#x2F;tag&#x2F;python-internals" rel="nofollow">https:&#x2F;&#x2F;eli.thegreenplace.net&#x2F;tag&#x2F;python-internals</a>
int_19hover 4 years ago
I heavily recommend this series from personal experience, since it was one of my primary references when working on <a href="https:&#x2F;&#x2F;docs.microsoft.com&#x2F;en-us&#x2F;visualstudio&#x2F;python&#x2F;debugging-mixed-mode-c-cpp-python-in-visual-studio" rel="nofollow">https:&#x2F;&#x2F;docs.microsoft.com&#x2F;en-us&#x2F;visualstudio&#x2F;python&#x2F;debuggi...</a>. Jumping straight into the CPython source code for the bytecode interpreter loop without a higher-level overview like this can be overwhelming.
Animatsover 4 years ago
I gather that BINARY_SUBTRACT in this context means type-independent subtraction of two operands. Not subtraction of two binary integers. So we aren&#x27;t yet seeing the dispatching which decides what type of subtraction to do. Integers? Floats? Strings? Some object that defines subtraction?<p>An important thing to realize about CPython&#x27;s implementation is that almost everything is really a key&#x2F;value map underneath. Which is why number-crunching has to be done in C.
评论 #24502425 未加载
emergedover 4 years ago
The main takeaway I got from this is how many ads managed to get through my adblocker. Impressive. Refused to read the article as a result though.
评论 #24501688 未加载