# Python dataclasses

7 Hacker News commenters recommended Python dataclasses and 0 criticized it, November 2025 to November 2026. It was recommended in 3 of 13 months.

**Verdict:** People recommend Python dataclasses for declaring a set of properties that are readable, syntactically nice, and work with static type checking.

## Why people recommend it

- Readable, nice syntax for declared properties (2 comments): "Having a declared set of properties is really useful, and it doesn't hurt either that they're syntactically nicer to use." ([source](https://news.ycombinator.com/item?id=46231804)) "I find the data classes example extremely readable." ([source](https://news.ycombinator.com/item?id=45851250))

## Alternatives hackers recommend

- [Polars](https://hackerapproved.com/p/polars.md): 152 recommend
- [pandas](https://hackerapproved.com/p/pandas.md): 93 recommend
- [NumPy](https://hackerapproved.com/p/numpy.md): 86 recommend
- [SciPy](https://hackerapproved.com/p/scipy.md): 12 recommend
- [sh Python library](https://hackerapproved.com/p/sh.md): 10 recommend

## Cite as

Hacker Approved, "Python dataclasses", https://hackerapproved.com/p/python-dataclasses/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
