MCPcopy 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
59def 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
65def valid_base_60(n, unit):

Callers 6

test_normalizeFunction · 0.90
__class_getitem__Method · 0.85
__init__Method · 0.85
filenameMethod · 0.85
nfc_equalFunction · 0.85
fold_equalFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_normalizeFunction · 0.72