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

Function numeric_string

Modules/_decimal/tests/randdec.py:110–114  ·  view source on GitHub ↗
(maxprec, maxexp)

Source from the content-addressed store, hash-verified

108 return ''.join((decimal_part(maxprec), exp_part))
109
110def numeric_string(maxprec, maxexp):
111 if randrange(100) > 95:
112 return ''.join((sign(), nan()))
113 else:
114 return ''.join((sign(), numeric_value(maxprec, maxexp)))
115
116def randdec(maxprec, maxexp):
117 return numeric_string(maxprec, maxexp)

Callers 1

randdecFunction · 0.85

Calls 4

nanFunction · 0.85
numeric_valueFunction · 0.85
signFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…