python check if self has property code example
Example 1: python check if has attribute
if hasattr(a, 'property'):
a.property
Example 2: python hasattribute
hasattr(object, name)
if hasattr(a, 'property'):
a.property
hasattr(object, name)