Skip to content

Glossary: Software Design Patterns

Type hint

Also written: type hints, type annotation

A note in the code, such as `-> bool` or `list[dict]`, saying what types a function expects and returns. Python doesn't enforce it, but tools like mypy read it.

Where the book teaches it

Related terms

mypyCallableProtocol