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

Method logical_invert

Lib/_pydecimal.py:3362–3370  ·  view source on GitHub ↗

Invert all its digits. The self must be logical number.

(self, context=None)

Source from the content-addressed store, hash-verified

3360 return _dec_from_triple(0, result.lstrip('0') or '0', 0)
3361
3362 def logical_invert(self, context=None):
3363 """Invert all its digits.
3364
3365 The self must be logical number.
3366 """
3367 if context is None:
3368 context = getcontext()
3369 return self.logical_xor(_dec_from_triple(0,'1'*context.prec,0),
3370 context)
3371
3372 def logical_or(self, other, context=None):
3373 """Applies an 'or' operation between self and other's digits.

Callers 4

test_none_argsMethod · 0.95
logical_invertMethod · 0.45
test_named_parametersMethod · 0.45
test_implicit_contextMethod · 0.45

Calls 3

logical_xorMethod · 0.95
getcontextFunction · 0.85
_dec_from_tripleFunction · 0.85

Tested by 3

test_none_argsMethod · 0.76
test_named_parametersMethod · 0.36
test_implicit_contextMethod · 0.36