PyDocs

Nav

Numeric and Mathematical Modules

Context.logical_invert

decimal

method of Context
  • Context.logical_invert(x, /)
Invert all the digits in the operand.

The operand must be a logical number.

    >>> ExtendedContext.logical_invert(Decimal('0'))
    Decimal('111111111')
    >>> ExtendedContext.logical_invert(Decimal('1'))
    Decimal('111111110')
    >>> ExtendedContext.logical_invert(Decimal('111111111'))
    Decimal('0')
    >>> ExtendedContext.logical_invert(Decimal('101010101'))
    Decimal('10101010')
    >>> ExtendedContext.logical_invert(1101)
    Decimal('111110010')
0 Examples
No examples for decimal/Context.logical_invert.
See Also
No see-alsos for decimal/Context.logical_invert
0 Notes
No notes for Context.logical_invert