Skip to content

Commit 03ddbf4

Browse files
committed
mention runtime
1 parent cde8668 commit 03ddbf4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

docs/types.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ class PngHeader:
8181
## Overview of type checkers
8282

8383
Types -- regardless how added -- are *only metadata* that can be queried from the class and they aren't used for anything out of the box.
84-
So, in practice, types show their biggest usefulness in combination with type-checking tools or IDE support.
84+
Some packages like [*cattrs*](https://catt.rs/) or Pydantic use this metadata for runtime type validation and (de-)serialization.
85+
86+
But their original purpose is to support static type-checking tools and IDEs.
8587

8688
Over the years, the type-checking community has come up with {pep}`681` that defines `dataclass_transform` to offer a baseline way to define dataclass-like class generators.
8789
All modern type-checking implementations support that, but in practice it's not enough to make the most out of *attrs*, so some offer further *attrs*-specific support.

0 commit comments

Comments
 (0)