Skip to content
Opensource internals
  • Posts

Structseq

CPython's structseq Implementation in C (PyStructSequence): Tuples With Names

Oct 20, 2026 9 min read Jay Hubbert

A struct sequence is a tuple subclass whose hidden fields live past ob_size in the same allocation — so len() sees only the visible ones while attributes see everything.

PythonCpythonInternalsStructseq

Read more →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·