I want to change the value of attribute pen_color in View class permanently when I call changeColor method and the value still permenant unless I call the method again with another color,
when I call changeColor method the pen_color attribute still have the same value and I don't want such thing
Is there any way to do such thing or not ?
class View:
def __init__(self):
self.pen_color = 'red'
class Button(View):
def __init__(self):
pass
def changeColor(self):
super().__init__()
self.pen_color = 'green'