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

Method __floordiv__

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

Source from the content-addressed store, hash-verified

855 self._microseconds)
856
857 def __floordiv__(self, other):
858 if not isinstance(other, (int, timedelta)):
859 return NotImplemented
860 usec = self._to_microseconds()
861 if isinstance(other, timedelta):
862 return usec // other._to_microseconds()
863 if isinstance(other, int):
864 return timedelta(0, 0, usec // other)
865
866 def __truediv__(self, other):
867 if not isinstance(other, (int, float, timedelta)):

Callers

nothing calls this directly

Calls 3

_to_microsecondsMethod · 0.95
isinstanceFunction · 0.85
timedeltaClass · 0.85

Tested by

no test coverage detected