Let's say I have a class called Number
class Number():
def __init__(self,n):
self.n=n
self.changed=None
a = Number(8)
print(a.n) #prints 8
a.n=9
print(a.n) #prints 9
When the n
class attribute changes, I want the changed
class attribute to be changed to True
.