Static Typing with Python¶
Tutorials¶
Guides¶
Reference¶
See also
The documentation at https://mypy.readthedocs.io/ is relatively accessible and complete.
Specification¶
- Specification for the Python type system
- The Python Type System
- Meta-topics
- Type system concepts
- Type annotations
- Type forms
- Special types in annotations
- Generics
- Type qualifiers
- Class type assignability
- Type aliases
- Literals
- Protocols
- Callables
- Constructors
Overloads- Exceptions
- Dataclasses
- Typed dictionaries
- Tuples
- Named Tuples
- Enumerations
- Type narrowing
- Type checker directives
- Distributing type information
- Historical and deprecated features
- Glossary
Typing PEPs¶
Significant changes to the Python Type System Specification are proposed and discussed in Python Enhancement Proposals (PEPs). See https://peps.python.org/topic/typing for a list of all current and historical typing-related PEPs.