How to Create “Immutable” Classes in Python

I’ve been reading a lot about Python’s magic methods lately and recently read about a couple of ways to create an immutable class. An immutable class does not allow the programmer to add attributes to an instance (i.e. monkey patch). It’s a little easier to understand if we actually look at a normal class first. […]

How to Create “Immutable” Classes in Python Read More »