Comment

Comment by designed

An advantage of dataclasses over dicts is that you can add methods and properties.

Also you can easily convert a dataclass to a dict with dataclasses.asdict. Not so easy to go from dict to dataclass though

parent designed 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton