but in this case
__getattr__
is always getting called ahead ofattr
Sorry, I do not understand.
>>> class C(object):
attr = property(fget = lambda self: 5)
def __getattr__(self, item):
# just returns a method for all items that match
# a certain pattern
return item
>>> C().x
'x'
>>> C().attr # attr.__get__ is called, not __getattr__
5
Could you specify what 'play nice with each other' means? A way to play nicely as I understand it: Method delegation in python