MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __sub__

Method __sub__

tools/python-3.11.9-amd64/Lib/_pydecimal.py:1255–1267  ·  view source on GitHub ↗

Return self - other

(self, other, context=None)

Source from the content-addressed store, hash-verified

1253 __radd__ = __add__
1254
1255 def __sub__(self, other, context=None):
1256 """Return self - other"""
1257 other = _convert_other(other)
1258 if other is NotImplemented:
1259 return other
1260
1261 if self._is_special or other._is_special:
1262 ans = self._check_nans(other, context=context)
1263 if ans:
1264 return ans
1265
1266 # self - other is computed as self + other.copy_negate()
1267 return self.__add__(other.copy_negate(), context=context)
1268
1269 def __rsub__(self, other, context=None):
1270 """Return other - self"""

Callers 3

next_minusMethod · 0.95
__rsub__Method · 0.45
subtractMethod · 0.45

Calls 4

_check_nansMethod · 0.95
__add__Method · 0.95
_convert_otherFunction · 0.85
copy_negateMethod · 0.45

Tested by

no test coverage detected