Skip to content
Opensource internals
  • Posts

Bool

How CPython Implements bool in C

Oct 20, 2026 7 min read Jay Hubbert

Python’s bool is unusual: it is a real type, but there are exactly two instances, True and False, and they are also the integers 1 and 0. In CPython that is implemented in …

PythonCpythonInternalsBool

Read more →

How PostgreSQL Implements bool in C

Oct 4, 2026 6 min read Jay Hubbert

bool looks like the easiest type in PostgreSQL. One bit of meaning, one byte of storage, done. It is not. The value has two different text spellings depending on which code path …

PostgresInternalsBool

Read more →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·