Protocols, dataclasses and describing shapes
Two questions, kept separate: what can this value do, and what is this value made of. Protocols answer the first, and dataclasses, `NamedTuple`, `TypedDict`, attrs and pydantic answer the second, each for a different reason.
12 min readintermediate
Sign in to read this lesson
This lesson is part of Types, errors and resources, which a free account opens. The orientation module of every course reads without one.
An account is free. There is no paid plan, no tier and nothing to buy.