if hasattr(a, 'property'):
a.property
try:
doStuff(a.property)
except AttributeError:
otherStuff()
if hasattr(a, 'property'):
doStuff(a.property)
else:
otherStuff()
assert hasattr(a, 'property'), 'object lacks property'
print(a.property)
getattr(a, 'property', 'default value')