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

Method copy_negate

Lib/_pydecimal.py:2985–2990  ·  view source on GitHub ↗

Returns a copy with the sign inverted.

(self)

Source from the content-addressed store, hash-verified

2983 return _dec_from_triple(0, self._int, self._exp, self._is_special)
2984
2985 def copy_negate(self):
2986 """Returns a copy with the sign inverted."""
2987 if self._sign:
2988 return _dec_from_triple(0, self._int, self._exp, self._is_special)
2989 else:
2990 return _dec_from_triple(1, self._int, self._exp, self._is_special)
2991
2992 def copy_sign(self, other, context=None):
2993 """Returns self with the sign of other."""

Callers 5

__neg__Method · 0.95
__pow__Method · 0.95
__sub__Method · 0.45
copy_negateMethod · 0.45
test_implicit_contextMethod · 0.45

Calls 1

_dec_from_tripleFunction · 0.85

Tested by 1

test_implicit_contextMethod · 0.36