Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: