Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
24
def
get_data():
25
values = []
26
for
_ in range(100):
27
obj = MyObject()
28
values.append(obj)
29
return
values
30
31
def
run():
32
deep_values = []
Callers
1
run
Function · 0.85
Calls
2
MyObject
Class · 0.70
append
Method · 0.45
Tested by
no test coverage detected