Although it's been posted here (only twice, though!) before, Philip Guo put up a 10-hour series of lectures on CPython internals[0]. I am nearly done with them, and have found them very useful and well-paced. Posting here because the author of this article seems to have stopped the series, and anyone interested in this stuff should definitely check out the Guo lectures.<p>[0]: <a href="http://pgbovine.net/cpython-internals.htm" rel="nofollow">http://pgbovine.net/cpython-internals.htm</a>
Contrary to what the article says, PyVarObject is still PyObject at the same time and PyVarObjects have nothing to do with mutability (certainly, it's trivialy obvious that not all PyVarObjects are mutable as immutable tuples are PyVarObjects, while mutable lists are not)<p>The thing that is handled by PyVarObject are types whose instances can differ in their size, with tuple and bytes objects being probably most common cases when it is used.
If you try to embed or extend Python in C you will be exposed to PyObject very quickly. The official Python documentation can walk you through that process (visit the embedding or extending parts).
The PyObject structure mentioned in the article also comes with many functions to manage them programatically, cast them to other types, etc.
Here is blog post about python list implementation, one of 2 main data structures used internally: <a href="http://www.laurentluce.com/posts/python-list-implementation/" rel="nofollow">http://www.laurentluce.com/posts/python-list-implementation/</a>
Cython can be used to auto-generate optimized Python C-API code that gets source-mapped line by line to original Cython code in the form of HTML annotations. This stuff is very hard to write by hand.