Python’s Rib Cage

Kirby Urner
3 min readFeb 2, 2024

You’re likely sure, based on imaginary GPT-like computations, that I’m talking about a species of snake, and its rib cage — and I am, metaphorically.

What I’m actually talking about gets introduced in Grokking Python: I’m talking about the syntax of the famous computer language named after Monty Python by its Dutch inventor.

Check out the following Dog class, endowed with two of Python’s “magic methods” also known as: “dunder methods” (with “dunder” being short for “double underline”) or “special methods”.

--

--