Comment

Comment by Ciantic

Interesting to find this here, if someone else haven't followed Python3, there is also NamedTuple which for all purposes is like immutable record:

    from typing import NamedTuple
    class Coord(NamedTuple):
        x: int
        y: int
I would prefer immutable records over dataclasses on many occasions.
parent Ciantic 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton