MCPcopy 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
63def digits(maxprec):
64 if maxprec == 0: return ''
65 return str(randrange(10**maxprec))
66
67def dot():
68 if randrange(2): return '.'

Callers 3

decimal_partFunction · 0.85
nanFunction · 0.85
rand_adjexpFunction · 0.85

Calls 1

strFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…