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

Method remove

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

Remove the node from the tree. Returns the position of the node in its parent's children before it was removed.

(self)

Source from the content-addressed store, hash-verified

136 self.was_changed = True
137
138 def remove(self):
139 """
140 Remove the node from the tree. Returns the position of the node in its
141 parent's children before it was removed.
142 """
143 if self.parent:
144 for i, node in enumerate(self.parent.children):
145 if node is self:
146 self.parent.changed()
147 del self.parent.children[i]
148 self.parent = None
149 return i
150
151 @property
152 def next_sibling(self):

Callers 15

putMethod · 0.45
getMethod · 0.45
create_unix_serverMethod · 0.45
_on_completionFunction · 0.45
acquireMethod · 0.45
waitMethod · 0.45
waitMethod · 0.45
acquireMethod · 0.45
pipe_connection_lostMethod · 0.45
_drain_helperMethod · 0.45
__isub__Method · 0.45

Calls 2

enumerateFunction · 0.85
changedMethod · 0.80

Tested by 10

test_removeMethod · 0.36
cleanupMethod · 0.36
test_newer_groupMethod · 0.36
test_no_optimize_flagMethod · 0.36
cleanup_testfnMethod · 0.36
cleanup_testfnMethod · 0.36