'Invert all its digits.'

def logical_invert(self, context=None):

    if (context is None):
        context = getcontext()
    return self.logical_xor(_dec_from_triple(0, ('1' * context.prec), 0), context)
