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

Function bin_random_mixed_op

Modules/_decimal/tests/randdec.py:481–494  ·  view source on GitHub ↗
(prec, emax, emin, itr=None)

Source from the content-addressed store, hash-verified

479 yield x
480
481def bin_random_mixed_op(prec, emax, emin, itr=None):
482 if itr is None:
483 itr = 1000
484 for _ in range(itr):
485 for func in number_funcs:
486 yield randdec(prec, emax), func()
487 yield func(), randdec(prec, emax)
488 for number in number_funcs:
489 for dec in close_funcs:
490 yield dec(prec, emax, emin), number()
491 # Test garbage input
492 for x in (['x'], ('y',), {'z'}, {1:'z'}):
493 for y in (['x'], ('y',), {'z'}, {1:'z'}):
494 yield x, y
495
496def tern_random_mixed_op(prec, emax, emin, itr):
497 if itr is None:

Callers 1

all_binaryFunction · 0.85

Calls 4

randdecFunction · 0.85
numberClass · 0.85
funcFunction · 0.50
decFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…