Tips or strategies to understanding how CPython works under the hood

Chris Angelico rosuav at gmail.com
Thu Jan 11 17:59:09 EST 2018


On Fri, Jan 12, 2018 at 9:52 AM, Skip Montanaro
<skip.montanaro at gmail.com> wrote:
>> So besides just grabbing a chunk of CPython source code and digesting it, I
>> was wondering if those of you have read and understood the source code, do
>> you have any tips or good starting points?
>
> Not mentioned yet, but maybe worth considering, might be to dip into
> the way back machine and start with a much earlier version of Python,
> maybe 1.5.2 or 2.0. The basic structure of the system is still there,
> but without much of the complexity which came along with more recent
> changes. No Unicode, types and classes were still separate, the
> bytecode interpreter was much simpler, many types were simpler.
>
> Once you have the basic foundation, pick something which has changed
> significantly, and make a deep dive into it.

Hmm. While I see the value in that, I think there's more value in
testing what's actually familiar. Work with the current version, and
tinker with it while you explore it. Unicode text, particularly, is
worth hanging onto.

ChrisA



More information about the Python-list mailing list