def objlocattr(accessing_obj, accessed_obj, *args, **kwargs):
 if hasattr(accessed_obj, 'obj'):
  accessed_obj = accessed_obj.obj
 if hasattr(accessed_obj, 'location'):
  return attr(accessed_obj.location, accessed_obj, *args, **kwargs)

def objlocattr ( accessing_obj , accessed_obj , * args , ** kwargs ) : if hasattr ( accessed_obj , 'obj' ) : accessed_obj = accessed_obj . obj if hasattr ( accessed_obj , 'location' ) : return attr ( accessed_obj . location , accessed_obj , * args , ** kwargs )
usage: locattr locattr locattr works like attr .