def call_attrs(obj, attrs_list, *args):
    for attr in attrs_list:
        if hasattr(obj, attr):
            bound_method = getattr(obj, attr)
return bound_method(*args)
raise AttributeError
Nested try statements in python?