MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / get_data

Function get_data

example_code/item_115/tracemalloc/waste_memory.py:24–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22 self.data = os.urandom(100)
23
24def get_data():
25 values = []
26 for _ in range(100):
27 obj = MyObject()
28 values.append(obj)
29 return values
30
31def run():
32 deep_values = []

Callers 1

runFunction · 0.85

Calls 2

MyObjectClass · 0.70
appendMethod · 0.45

Tested by

no test coverage detected