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

Method getAttribute

Lib/xml/dom/minidom.py:734–748  ·  view source on GitHub ↗

Returns the value of the specified attribute. Returns the value of the element's attribute named attname as a string. An empty string is returned if the element does not have such an attribute. Note that an empty string may also be returned as an explicitly given att

(self, attname)

Source from the content-addressed store, hash-verified

732 Node.unlink(self)
733
734 def getAttribute(self, attname):
735 """Returns the value of the specified attribute.
736
737 Returns the value of the element's attribute named attname as
738 a string. An empty string is returned if the element does not
739 have such an attribute. Note that an empty string may also be
740 returned as an explicitly given attribute value, use the
741 hasAttribute method to distinguish these two cases.
742 """
743 if self._attrs is None:
744 return ""
745 try:
746 return self._attrs[attname].value
747 except KeyError:
748 return ""
749
750 def getAttributeNS(self, namespaceURI, localName):
751 if self._attrsNS is None:

Callers 15

glossary_searchFunction · 0.80
handleNavigationClickFunction · 0.80
applyLineColorsFunction · 0.80
toggleSpecViewFunction · 0.80
populateBytecodePanelFunction · 0.80
applyHeatmapBarColorsFunction · 0.80
hFunction · 0.80
TnFunction · 0.80
d3.min.jsFile · 0.80
toFunction · 0.80
eoFunction · 0.80

Calls

no outgoing calls

Tested by 4

testAddAttrMethod · 0.64
testChangeAttrMethod · 0.64
testGetAttributeMethod · 0.64