xxxxxxxxxx
class A:
is_mutable = True
def __init__(self, c):
self.c = c
self.is_mutable = False
def __setattr__(self, name, value):
if self.is_mutable:
super().__setattr__(name, value)
else:
raise AttributeError("Immutable object")
def __mul__(self, other):
return self.__c + other.__c