python 2.7 check if set has object with specific attribute code example Example: python check if has attribute if hasattr(a, 'property'): a.property