News for hackers. Stuff that matters.
Re:Python 3.7 released by michaelmcmillan on Thursday June 28, 2018 @07:20AM (#17415911)
Love data classes! Would've been even cooler if they could've been made immutable.

Oops, never mind: "It is not possible to create truly immutable Python objects. However, by passing frozen=True to the dataclass() decorator you can emulate immutability. In that case, dataclasses will add __setattr__() and __delattr__() methods to the class. These methods will raise a FrozenInstanceError when invoked."

There are no comments on this comment yet.