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

Method __mod__

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

Source from the content-addressed store, hash-verified

885 return timedelta(0, 0, _divide_and_round(b * usec, a))
886
887 def __mod__(self, other):
888 if isinstance(other, timedelta):
889 r = self._to_microseconds() % other._to_microseconds()
890 return timedelta(0, 0, r)
891 return NotImplemented
892
893 def __divmod__(self, other):
894 if isinstance(other, timedelta):

Callers

nothing calls this directly

Calls 2

_to_microsecondsMethod · 0.95
timedeltaClass · 0.85

Tested by

no test coverage detected