Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ randfraction
Function
randfraction
Modules/_decimal/tests/randdec.py:462–467 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
460
return
complex(real, imag)
461
462
def
randfraction():
463
num = randint()
464
denom = randint()
465
if
denom == 0:
466
denom = 1
467
return
Fraction(num, denom)
468
469
number_funcs = [randint, randfloat, randcomplex, randfraction]
470
Callers
nothing calls this directly
Calls
2
Fraction
Class · 0.90
randint
Function · 0.85
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…