Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/fluentpython/example-code-2e
/ normalize
Function
normalize
24-class-metaprog/hours/hours.py:59–62 ·
view source on GitHub ↗
(s: float)
Source
from the content-addressed store, hash-verified
57
58
59
def
normalize(s: float) -> Tuple[int, int, float]:
60
h, r = divmod(s, 3600)
61
m, s = divmod(r, 60)
62
return
int(h), int(m), s
63
64
65
def
valid_base_60(n, unit):
Callers
6
test_normalize
Function · 0.90
__class_getitem__
Method · 0.85
__init__
Method · 0.85
filename
Method · 0.85
nfc_equal
Function · 0.85
fold_equal
Function · 0.85
Calls
no outgoing calls
Tested by
1
test_normalize
Function · 0.72