hasattr(object, name) => bool
Checks for a named attribute.
The arguments are an object and a string. The result is True if the
string is the name of one of the object’s attributes, False if
not. (This is implemented by calling getattr and
seeing whether it raises an exception or not.)