MCPcopy
hub / github.com/beeware/toga / append

Method append

core/src/toga/sources/tree_source.py:139–147  ·  view source on GitHub ↗

Append a node to the end of the list of children of this node. :param data: The data to append as a child of this node. This data will be converted into a Node object. :param children: The data for the children of the new child node. :returns: The new added child

(self, data: object, children: object = None)

Source from the content-addressed store, hash-verified

137 return node
138
139 def append(self, data: object, children: object = None) -> Node[T]:
140 """Append a node to the end of the list of children of this node.
141
142 :param data: The data to append as a child of this node. This data will be
143 converted into a Node object.
144 :param children: The data for the children of the new child node.
145 :returns: The new added child Node object.
146 """
147 return self.insert(len(self), data=data, children=children)
148
149 def remove(self, child: Node[T]) -> None:
150 """Remove a child node from this node.

Callers 15

purge_toolbarMethod · 0.45
take_photoMethod · 0.45
request_permissionMethod · 0.45
current_locationMethod · 0.45
get_selectionMethod · 0.45
get_selectionMethod · 0.45
saveMethod · 0.45
_addInputMethod · 0.45
add_locationMethod · 0.45
logMethod · 0.45
valuesMethod · 0.45

Calls 1

insertMethod · 0.95

Tested by 15

set_boundsMethod · 0.36
test_position_cascadeFunction · 0.36
test_accessors_copiedFunction · 0.36
test_appendFunction · 0.36
test_findFunction · 0.36
test_appendFunction · 0.36
test_append_leafFunction · 0.36
test_findFunction · 0.36
test_accessors_copiedFunction · 0.36