Cheuk Ting Ho: Epic Evolution of Typing in Python: How We Get Here and Where Are We Going?

published Oct 17, 2025

Talk by Cheuk Ting Ho at Plone Conference 2025 in Jyväskylä, Finland.

Read about me: https://cheuk.dev

Question: What is the typing system of Python? Answer: Python is a dynamically typed language.

Strict typing can help avoid bugs, and make the expectations clearer.

Dynamically typed is good. It is easy to learn, faster to code if the code base is small, faster in runtime, makes for more flexible APIs, nice for prototypes.

Dynamically typed is bad. There are fewer signs of potential errors. A type mismatch will not raise an error until runtime. If the code base is big, it can be hard to maintain. Information about what input type works, needs then to be specified in documentation.

As Python grows, there are needs to overcome these disadvantages of dynamic typing. So Python evolved, and you can now use typing. A short history:

  • Before Python 3.5, there were already arbitrary annotations.
  • In Python 3.5, PEP 484: optional type hints, with the typing module added. This established gradual typing, giving space to gradually move code over to typing.
  • In Python 3.9, PEP 585: typing in the standard built-ins without always having to import typing; collection types.
  • In Python 3.12, PEP 695: type statement added. This introduces a first-class syntax for declaring type paremeters. It simplifies and clarifies.

But how can we achieve typing in Python? You can use type checkers. Static type checkers don't run your code: they just read it and check it that way. Examples: Mypy, Ty, Pyrefly. Dynamic validation: serializing complex data in runtime. Examples: Pydantic, Marshmallow.

Mypy is the reference implementation of PEP 484. Ty, Pyrefly and Pydantic (v2) are written in Rust, which improves the speed a lot.