MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / valid_base_60

Function valid_base_60

24-class-metaprog/hours/hours.py:65–68  ·  view source on GitHub ↗
(n, unit)

Source from the content-addressed store, hash-verified

63
64
65def valid_base_60(n, unit):
66 if not (0 <= n < 60):
67 raise ValueError(f'invalid {unit} {n}')
68 return n
69
70
71class Hours:

Callers 1

__class_getitem__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected