I'd like for an attribute call like object.x
to return the results of some method, say object.other.other_method()
. How can I do this?
Edit: I asked a bit soon: it looks like I can do this with
object.__dict__['x']=object.other.other_method()
Is this an OK way to do this?