MCPcopy Index your code
hub / github.com/RustPython/RustPython / setAttribute

Method setAttribute

Lib/xml/dom/minidom.py:758–768  ·  view source on GitHub ↗
(self, attname, value)

Source from the content-addressed store, hash-verified

756 return ""
757
758 def setAttribute(self, attname, value):
759 attr = self.getAttributeNode(attname)
760 if attr is None:
761 attr = Attr(attname)
762 attr.value = value # also sets nodeValue
763 attr.ownerDocument = self.ownerDocument
764 self.setAttributeNode(attr)
765 elif value != attr.value:
766 attr.value = value
767 if attr.isId:
768 _clear_id_cache(self)
769
770 def setAttributeNS(self, namespaceURI, qualifiedName, value):
771 prefix, localname = _nssplit(qualifiedName)

Callers 13

testAAAMethod · 0.80
testAABMethod · 0.80
testAddAttrMethod · 0.80
testDeleteAttrMethod · 0.80
testRemoveAttrMethod · 0.80
testHasAttributeMethod · 0.80
testChangeAttrMethod · 0.80
testGetAttrListMethod · 0.80
testGetAttrValuesMethod · 0.80
testAttributeReprMethod · 0.80

Calls 4

getAttributeNodeMethod · 0.95
setAttributeNodeMethod · 0.95
AttrClass · 0.85
_clear_id_cacheFunction · 0.85

Tested by 13

testAAAMethod · 0.64
testAABMethod · 0.64
testAddAttrMethod · 0.64
testDeleteAttrMethod · 0.64
testRemoveAttrMethod · 0.64
testHasAttributeMethod · 0.64
testChangeAttrMethod · 0.64
testGetAttrListMethod · 0.64
testGetAttrValuesMethod · 0.64
testAttributeReprMethod · 0.64