MCPcopy Index your code
hub / github.com/python/cpython / logical_invert

Method logical_invert

Lib/_pydecimal.py:3365–3373  ·  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

3363 return _dec_from_triple(0, result.lstrip('0') or '0', 0)
3364
3365 def logical_invert(self, context=None):
3366 """Invert all its digits.
3367
3368 The self must be logical number.
3369 """
3370 if context is None:
3371 context = getcontext()
3372 return self.logical_xor(_dec_from_triple(0,'1'*context.prec,0),
3373 context)
3374
3375 def logical_or(self, other, context=None):
3376 """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