Programming by contract in Python

by Kevin Dangoor

PEP 316 — Programming by Contract for Python. It’s a nifty thing that many PEPs include a reference implementation written in Python.