Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/fluentpython/example-code-2e
/ check
Function
check
20-executors/primes/proc_pool.py:21–24 ·
view source on GitHub ↗
(n: int)
Source
from the content-addressed store, hash-verified
19
elapsed: float
20
21
def
check(n: int) -> PrimeResult:
22
t0 = perf_counter()
23
res = is_prime(n)
24
return
PrimeResult(n, res, perf_counter() - t0)
25
26
def
main() -> None:
27
if
len(sys.argv) < 2:
Callers
1
wrapper
Function · 0.50
Calls
2
is_prime
Function · 0.90
PrimeResult
Class · 0.70
Tested by
no test coverage detected