How about:
for name in 'a', 'b', 'c':
try:
thing = getattr(obj, name)
except AttributeError:
pass
else:
break
How about:
for name in 'a', 'b', 'c':
try:
thing = getattr(obj, name)
except AttributeError:
pass
else:
break