News for hackers. Stuff that matters.
Re:Show HN: Gelidum – My Python library to freeze objects by m_mueller on Tuesday June 15, 2021 @05:04AM (#27512845)
FYI there is also

    @dataclass(frozen=True)
this tends to be enough for my usecases. you can still circumvent (and sometimes have to in dataclass post_init) with object.__setattr__.
Re:Show HN: Gelidum – My Python library to freeze objects by diegojromero on Tuesday June 15, 2021 @05:12AM (#27512876)
I knew about dataclasses when I started writting gelidum, but I wanted to make the immutable objects be from any classes, those under my control or not.

Having said that, I think dataclasses are a better solution for making immutable objects if the class is going to be made from the start.