MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / set_child

Method set_child

tools/python-3.11.9-amd64/Lib/lib2to3/pytree.py:288–296  ·  view source on GitHub ↗

Equivalent to 'node.children[i] = child'. This method also sets the child's parent attribute appropriately.

(self, i, child)

Source from the content-addressed store, hash-verified

286 self.children[0].prefix = prefix
287
288 def set_child(self, i, child):
289 """
290 Equivalent to 'node.children[i] = child'. This method also sets the
291 child's parent attribute appropriately.
292 """
293 child.parent = self
294 self.children[i].parent = None
295 self.children[i] = child
296 self.changed()
297
298 def insert_child(self, i, child):
299 """

Callers 2

test_node_set_childMethod · 0.95
transformMethod · 0.80

Calls 1

changedMethod · 0.80

Tested by 1

test_node_set_childMethod · 0.76