Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/bslatkin/effectivepython
/ get_first_int
Function
get_first_int
example_code/item_004.py:104–108 ·
view source on GitHub ↗
(values, key, default=0)
Source
from the content-addressed store, hash-verified
102
103
print(
"Example 7"
)
104
def
get_first_int(values, key, default=0):
105
found = values.get(key, [
""
])
106
if
found[0]:
107
return
int(found[0])
108
return
default
109
110
111
print(
"Example 8"
)
Callers
1
item_004.py
File · 0.85
Calls
1
get
Method · 0.45
Tested by
no test coverage detected