Offline

The Problem with None: Sentinel Values and the Semantics of Absence

Track:
Python Core, Internals, Extensions
Type:
Talk
Level:
intermediate
Room:
Chamber Hall B (S3B)
Start:
14:35 on Friday, 17 July 2026
End:
15:05 on Friday, 17 July 2026
Duration:
30 minutes
View in the schedule

Abstract

None is probably the most overloaded value in Python — and often the wrong one.

Python quietly depends on sentinel values: None, NotImplemented, Ellipsis, dataclasses.MISSING. They aren’t just placeholders. They define semantics, coordinate object interactions, and influence API design in subtle but powerful ways.

In this talk, we treat sentinel values as a deliberate design tool. We’ll uncover how NotImplemented enables double dispatch, why None frequently conflates “missing” with “empty,” and how sentinel patterns permeate the standard library.

But the real tension appears in typing. Python’s type system still cannot properly express sentinel semantics. Optional, overload, and Literal only approximate the problem, and building a fully typed custom sentinel remains an open challenge.

We’ll examine the deferred PEP 661, what it tried to solve, and what its absence means today. Expect practical patterns, real-world examples, and a sharper way to think about absence in Python.