Skip to content

Patterns

A pattern is a general recipe for solving a class of similar problems. Type annotations bring some new considerations and trade-offs into Python, so new common ways of solving problems have emerged.

As always, just because a pattern exists doesn't mean you should use it! Consider the code around you, your teammates and what patterns you're already using in your project.