MCPcopy Index your code
hub / github.com/RustPython/RustPython / _mod

Method _mod

Lib/fractions.py:878–881  ·  view source on GitHub ↗

a % b

(a, b)

Source from the content-addressed store, hash-verified

876 __divmod__, __rdivmod__ = _operator_fallbacks(_divmod, divmod, False)
877
878 def _mod(a, b):
879 """a % b"""
880 da, db = a.denominator, b.denominator
881 return Fraction((a.numerator * db) % (b.numerator * da), da * db)
882
883 __mod__, __rmod__ = _operator_fallbacks(_mod, operator.mod, False)
884

Callers 2

execute_bin_opMethod · 0.80
mod_Function · 0.80

Calls 1

FractionClass · 0.85

Tested by

no test coverage detected