Skip to content
Opensource internals
  • Posts

Posts

All posts published on this site.

Everything published here, newest first.

CPython's NotImplemented Implementation in C

Oct 20, 2026 8 min read Jay Hubbert

NotImplemented is an immortal static singleton that binary operators return to say ’not my job’ — the interpreter then tries the reflected operand before raising TypeError.

PythonCpythonInternalsNotimplemented

Read more →

CPython's object Implementation in C

Oct 20, 2026 8 min read Jay Hubbert

object is a 16-byte struct holding just ob_refcnt and ob_type — and PyBaseObject_Type fills in the defaults every other type inherits or overrides.

PythonCpythonInternalsObject

Read more →

CPython's OrderedDict in C: O(1) Insertion Order That Just Works

Oct 20, 2026 12 min read Jay Hubbert

OrderedDict is a dict subclass with a linked list of keys and a lazily rebuilt mirror array, giving O(1) node lookup without touching every dict resize.

PythonCpythonInternalsOrdereddictCollections

Read more →

CPython's pickle.PickleBuffer Implementation in C: Out-of-Band Data Without Copies

Oct 20, 2026 7 min read Jay Hubbert

PickleBuffer is a tiny C object that holds one Py_buffer view and forwards every buffer request straight to the original exporter — no copies, no managed-buffer layer.

PythonCpythonInternalsPickleBuffer protocol

Read more →

CPython's PyCapsule Implementation in C: A void* Wrapper for Extension Modules

Oct 20, 2026 9 min read Jay Hubbert

A PyCapsule is a typed, name-checked void* wrapper: the name stops you reading the wrong capsule, and the destructor gets one shot to clean up before the memory goes.

PythonCpythonInternalsCapsule

Read more →

← Newer Page 50 of 83 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·