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

Method copy_sign

Lib/_pydecimal.py:2992–2996  ·  view source on GitHub ↗

Returns self with the sign of other.

(self, other, context=None)

Source from the content-addressed store, hash-verified

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."""
2994 other = _convert_other(other, raiseit=True)
2995 return _dec_from_triple(other._sign, self._int,
2996 self._exp, self._is_special)
2997
2998 def exp(self, context=None):
2999 """Returns e ** self."""

Callers 4

next_towardMethod · 0.95
copy_signMethod · 0.45
test_copy_signMethod · 0.45
test_implicit_contextMethod · 0.45

Calls 2

_convert_otherFunction · 0.85
_dec_from_tripleFunction · 0.85

Tested by 2

test_copy_signMethod · 0.36
test_implicit_contextMethod · 0.36