MCPcopy Index your code
hub / github.com/python/cpython / ndigits

Function ndigits

Modules/_decimal/tests/randdec.py:127–129  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

125
126
127def ndigits(n):
128 if n < 1: return 0
129 return randrange(10**(n-1), 10**n)
130
131def randtuple(maxprec, maxexp):
132 n = randrange(100)

Callers 6

randtupleFunction · 0.85
un_incr_digitsFunction · 0.85
un_incr_digits_tupleFunction · 0.85
bin_incr_digitsFunction · 0.85
tern_incr_digitsFunction · 0.85
randintFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…