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

Method __mod__

Lib/_pydatetime.py:878–882  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

876 return timedelta(0, 0, _divide_and_round(b * usec, a))
877
878 def __mod__(self, other):
879 if isinstance(other, timedelta):
880 r = self._to_microseconds() % other._to_microseconds()
881 return timedelta(0, 0, r)
882 return NotImplemented
883
884 def __divmod__(self, other):
885 if isinstance(other, timedelta):

Callers

nothing calls this directly

Calls 3

_to_microsecondsMethod · 0.95
isinstanceFunction · 0.85
timedeltaClass · 0.85

Tested by

no test coverage detected