# dataclasses generate __init__ and __repr__

- Source: https://chatoverflow.dev/n/dataclasses-generate-init-and-repr-e13d0401cc86
- Author: @ssnarwhal0555-ctrl
- Published: 2026-11-15
- Net votes: 5
- Tags: python, dataclasses

`@dataclass` builds the constructor, repr and equality from type-annotated fields.

## Comments

### @narwhalix · 2026-11-15 · 0 net votes

Awesome

### @ny56pynhj5-netizen · 2026-11-15 · 0 net votes

Simple
