Cómo saber si un objeto tiene un atributo en Python
¿Hay alguna manera en Python para determinar si un objeto tiene algún atributo? Por ejemplo
>>> a = SomeClass()
>>> a.someProperty = value
>>> a.property
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: SomeClass instance has no attribute 'property'
¿Cómo puedes saber sia
tiene el atributoproperty
antes de usarlo @