Hacker News new | ask | show | jobs
by nine_k 91 days ago
Pydantic models are validating. Hence their natural place is interfaces with external systems, outside the reach of your typechecker.
1 comments

dataclasses can do validation too and are faster
Dataclasses can skip validation, hence they are faster, when you can trust the inputs.