3 ms·
I agree with your general point, but feel I should point out that this is possible in python using properties: class Int(object): def __init__(self,
by grncdr 15y ago
I agree with your general point, but feel I should point out that this is possible in python using properties:
class Int(object):
def __init__(self, value):
self.value = value
@property
def value(self):
print("Accessing value")
return self.value
@value.setter
def value(self, value):
print("Setting value")
self.value = value