MCPcopy Create free account
hub / github.com/python/cpython / __floordiv__

Method __floordiv__

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

Source from the content-addressed store, hash-verified

864 self._microseconds)
865
866 def __floordiv__(self, other):
867 if not isinstance(other, (int, timedelta)):
868 return NotImplemented
869 usec = self._to_microseconds()
870 if isinstance(other, timedelta):
871 return usec // other._to_microseconds()
872 if isinstance(other, int):
873 return timedelta(0, 0, usec // other)
874
875 def __truediv__(self, other):
876 if not isinstance(other, (int, float, timedelta)):

Callers

nothing calls this directly

Calls 2

_to_microsecondsMethod · 0.95
timedeltaClass · 0.85

Tested by

no test coverage detected