MCPcopy Create free account
hub / github.com/KentBeck/BPlusTree3 / copy

Method copy

python/bplustree/__init__.py:100–105  ·  view source on GitHub ↗

Create a shallow copy of the tree.

(self)

Source from the content-addressed store, hash-verified

98 self[key] = value
99
100 def copy(self):
101 """Create a shallow copy of the tree."""
102 new_tree = BPlusTreeMap(capacity=self.capacity)
103 for key, value in self.items():
104 new_tree[key] = value
105 return new_tree
106
107 @property
108 def capacity(self):

Callers 11

test_copy_empty_treeMethod · 0.95
demo_api_compatibilityFunction · 0.95
mainFunction · 0.95
run_capacity_sweepFunction · 0.45
test_generate_gprofFunction · 0.45
test_copyMethod · 0.45
__init__Method · 0.45

Calls 2

itemsMethod · 0.95
BPlusTreeMapClass · 0.70