Re:Show HN: Gelidum – My Python library to freeze objects
by 4ec0755f5522 on Monday June 14, 2021 @08:46PM
(#27510139)
I use attrs for this. The objects are not truly immutable in the sense that you can modify then if you are really determined to but typical assignment of a new value to a attrs defined field (where frozen=True) will raise an error.
https://www.attrs.org/en/stable/examples.html#immutability