(self, name)
return name in self._attrs
Checks whether the element has an attribute with the specified name.

        Returns True if the element has an attribute with the specified name.
        Otherwise, returns False.
Checks whether the element has an attribute with the specified name.
Checks whether the element has an attribute with the specified name .
def hasAttribute(self, name):
        """Checks whether the element has an attribute with the specified name.

        Returns True if the element has an attribute with the specified name.
        Otherwise, returns False.
        """
        if self._attrs is None:
            return False
        return name in self._attrs
def hasAttribute ( self , name ) : if self . _attrs is None : return False return name in self . _attrs