Skip to content
Opensource internals
  • Posts

Posts

All posts published on this site.

Everything published here, newest first.

CPython's NoneType Implementation in C (None)

Oct 20, 2026 7 min read Jay Hubbert

None is a single static immortal PyObject: no allocation, no refcounting, and identity comparison — plus a dedicated stack-ref encoding for the eval loop.

PythonCpythonInternalsNonetypeNone

Read more →

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 →

← Newer Page 20 of 53 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·