the code below returns this error:
Traceback (most recent call last):
File "main.py", line 39, in
File "/file_location", line ###, in val
AttributeError: 'super' object has no attribute 'val'
class parent():
def __init__(self, initval):
self._val = initval
@property
def val(self):
return self._val
@val.setter
def val(self, valin):
self._val = valin
print('in parent')
def child(parent):
@property
def val(self):
return super()._val
@val.setter
def val(self, valin):
super().val = valin
print('in child')
the code below returns this error:
Traceback (most recent call last):
File "main.py", line 39, in
File "/file_location", line ###, in val
AttributeError: 'super' object has no attribute 'val'