Returns the quotient of `other` and `self` rounded down. Args: other: Another Dimension, or a value accepted by `as_dimension`. Returns: A `Dimension` whose value is the integer quotient of `self` and `other`.
(self, other)
| 477 | return Dimension(self._value // other.value) |
| 478 | |
| 479 | def __rfloordiv__(self, other): |
| 480 | """Returns the quotient of `other` and `self` rounded down. |
| 481 | |
| 482 | Args: |
| 483 | other: Another Dimension, or a value accepted by `as_dimension`. |
| 484 | |
| 485 | Returns: |
| 486 | A `Dimension` whose value is the integer quotient of `self` and `other`. |
| 487 | """ |
| 488 | other = as_dimension(other) |
| 489 | if self._value is None or other.value is None: |
| 490 | return Dimension(None) |
| 491 | else: |
| 492 | return Dimension(other.value // self._value) |
| 493 | |
| 494 | def __div__(self, other): |
| 495 | """DEPRECATED: Use `__floordiv__` via `x // y` instead. |
nothing calls this directly
no test coverage detected