Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ digits
Function
digits
Modules/_decimal/tests/randdec.py:63–65 ·
view source on GitHub ↗
(maxprec)
Source
from the content-addressed store, hash-verified
61
return
"eE"
[randrange(2)]
62
63
def
digits(maxprec):
64
if
maxprec == 0:
return
''
65
return
str(randrange(10**maxprec))
66
67
def
dot():
68
if
randrange(2):
return
'.'
Callers
3
decimal_part
Function · 0.85
nan
Function · 0.85
rand_adjexp
Function · 0.85
Calls
1
str
Function · 0.85
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…