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

Method removeChild

Lib/xml/dom/minidom.py:163–177  ·  view source on GitHub ↗
(self, oldChild)

Source from the content-addressed store, hash-verified

161 return oldChild
162
163 def removeChild(self, oldChild):
164 try:
165 self.childNodes.remove(oldChild)
166 except ValueError:
167 raise xml.dom.NotFoundErr()
168 if oldChild.nextSibling is not None:
169 oldChild.nextSibling.previousSibling = oldChild.previousSibling
170 if oldChild.previousSibling is not None:
171 oldChild.previousSibling.nextSibling = oldChild.nextSibling
172 oldChild.nextSibling = oldChild.previousSibling = None
173 if oldChild.nodeType in _nodeTypes_with_children:
174 _clear_id_cache(self)
175
176 oldChild.parentNode = None
177 return oldChild
178
179 def normalize(self):
180 L = []

Callers 15

replaceChildMethod · 0.95
destroyMethod · 0.45
InFunction · 0.45
d3.min.jsFile · 0.45
itFunction · 0.45
itFunction · 0.45
testWholeTextMethod · 0.45
testDocRemoveChildMethod · 0.45
insertBeforeMethod · 0.45
appendChildMethod · 0.45

Calls 2

_clear_id_cacheFunction · 0.85
removeMethod · 0.45

Tested by 4

itFunction · 0.36
itFunction · 0.36
testWholeTextMethod · 0.36
testDocRemoveChildMethod · 0.36