CPython's str Implementation in C (Unicode): One Byte per Character When You Can
A CPython str picks the narrowest of 1, 2, or 4 bytes per code point at allocation time — so an all-ASCII string is one allocation with no UTF-8 cache at all.
A CPython str picks the narrowest of 1, 2, or 4 bytes per code point at allocation time — so an all-ASCII string is one allocation with no UTF-8 cache at all.
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.
super() is not special syntax — it’s a three-pointer C object, and the compiler even skips building one for super().attr via the LOAD_SUPER_ATTR bytecode.
t-strings produce a Template object — literal strings plus Interpolation objects — not a formatted string, so the pieces stay inspectable and reusable.
A CPython tuple has no separate buffer — the item array is embedded in the object, so its memory footprint is exactly its length and nothing more.