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

Function _set_attribute_node

Lib/xml/dom/minidom.py:951–960  ·  view source on GitHub ↗
(element, attr)

Source from the content-addressed store, hash-verified

949
950
951def _set_attribute_node(element, attr):
952 _clear_id_cache(element)
953 element._ensure_attributes()
954 element._attrs[attr.name] = attr
955 element._attrsNS[(attr.namespaceURI, attr.localName)] = attr
956
957 # This creates a circular reference, but Element.unlink()
958 # breaks the cycle since the references to the attribute
959 # dictionaries are tossed.
960 attr.ownerElement = element
961
962class Childless:
963 """Mixin that makes childless-ness easy to implement and avoids

Callers 3

start_element_handlerMethod · 0.90
start_element_handlerMethod · 0.90
setAttributeNodeMethod · 0.85

Calls 2

_clear_id_cacheFunction · 0.85
_ensure_attributesMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…