The Advanced Type System
The PR had been open for two days when Priya finally read through it carefully. Amir's refactor of the data pipeline used TypeVar in four places and Protocol in three. Mypy had caught an actual bug before any tests ran — a transformation function receiving the wrong kind of object, a mistake that would have been invisible until staging. The type checker had done the work of a careful code review, automatically, before a single human looked at the diff. Priya had left a thumbs-up and approved it without understanding what she was approving. She had seen TypeVar before, had read the word Protocol in a docstring, had merged code that imported ABC. She knew these tools existed the way she knew building codes existed — as a body of rules that governed how serious systems were constructed, enforced by people who understood them. She was not one of those people yet. The code review from last sprint still sat in her inbox: use Protocol here, not ABC. She had nodded at the comment and made the change without understanding why one was preferred over the other. There was a difference. It mattered. She did not have the vocabulary to see it. What she sensed — without being able to name it — was that Python's type system was not just about catching errors. It was a way of expressing intent, of writing contracts into the code itself. This week she gets the words for what she has been sensing.