Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/grantjenks/python-sortedcontainers
/ fill_values
Function
fill_values
tests/benchmark_sorteddict.py:48–53 ·
view source on GitHub ↗
(obj, size)
Source
from the content-addressed store, hash-verified
46
pass
47
48
def
fill_values(obj, size):
49
if
hasattr(obj,
'update'
):
50
obj.update({val: -val
for
val in range(size)})
51
else
:
52
for
val in range(size):
53
obj[val] = -val
54
55
# Implementation imports.
56
Callers
nothing calls this directly
Calls
1
update
Method · 0.45
Tested by
no test coverage detected