Returns the subtraction of `self` from `other`. Args: other: Another Dimension, or a value accepted by `as_dimension`. Returns: A Dimension whose value is the subtraction of `self` from `other`.
(self, other)
| 388 | return Dimension(self._value - other.value) |
| 389 | |
| 390 | def __rsub__(self, other): |
| 391 | """Returns the subtraction of `self` from `other`. |
| 392 | |
| 393 | Args: |
| 394 | other: Another Dimension, or a value accepted by `as_dimension`. |
| 395 | |
| 396 | Returns: |
| 397 | A Dimension whose value is the subtraction of `self` from `other`. |
| 398 | """ |
| 399 | other = as_dimension(other) |
| 400 | if self._value is None or other.value is None: |
| 401 | return Dimension(None) |
| 402 | else: |
| 403 | return Dimension(other.value - self._value) |
| 404 | |
| 405 | def __mul__(self, other): |
| 406 | """Returns the product of `self` and `other`. |
nothing calls this directly
no test coverage detected