has_attribute method

has_attribute(name)

Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.

Returns

True if has attribute with the name; otherwise, false.

def has_attribute(self, name):
    ...
ParameterTypeDescription
namestrThe attribute name.

See Also