Hacker News new | ask | show | jobs
by seabrookmx 611 days ago
Subclassing NamedTuple is very ergonomic, and given they're immutable unlike data classes I often reach for them by default. I still use Pydantic when I want custom validation or when it ties into another lib like FastAPI.
1 comments

You know about frozenset, right? Dataclasses can be immutable.

It's python, so take that with a grain of salt.