MCPcopy Index your code
hub / github.com/python/cpython / hasAttribute

Method hasAttribute

Lib/xml/dom/minidom.py:852–860  ·  view source on GitHub ↗

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.

(self, name)

Source from the content-addressed store, hash-verified

850 removeAttributeNodeNS = removeAttributeNode
851
852 def hasAttribute(self, name):
853 """Checks whether the element has an attribute with the specified name.
854
855 Returns True if the element has an attribute with the specified name.
856 Otherwise, returns False.
857 """
858 if self._attrs is None:
859 return False
860 return name in self._attrs
861
862 def hasAttributeNS(self, namespaceURI, localName):
863 if self._attrsNS is None:

Callers 3

baFunction · 0.80
EwFunction · 0.80
testHasAttributeMethod · 0.80

Calls

no outgoing calls

Tested by 1

testHasAttributeMethod · 0.64