Can somebody tell me why there is a recursion in the following code ?
class A:
def __init__(self):
self.a = 0
@property
def a(self):
print ("called a getter")
return self.a
@a.setter
def a(self, value):
print ("called a setter")
self.a = value
class B(A):
def check(self):
a = 10
if __name__ == "__main__":
bb = B()
bb.check()
I have to call a base class setter from child class. I am not allowed to access the member directly. Can somebody tell me how to do other way ?