I have a class similar to this:
return "Humpty Dumpty"
name = (hello,)
age = models.IntegerField()
(property object at 0x0000000004FDCBD8,)
If you just want to get the function called on attribute access, define name as property and provide your function
foo to it:
name = property(hello)
This will set the
fget inside the property to your function
y = X() y.name 'Humpty Dumpty'
Take note, there's a pretty good tutorial on descriptors in the Python Official docs.