Applies the logical operation 'or' between each operand's digits. The operands must be both logical numbers. >>> ExtendedContext.logical_or(Decimal('0'), Decimal('0')) Decimal('0') >>> ExtendedContext.logical_or(Decimal('0'), Decimal('1')) Decimal('1')
(self, a, b)
| 4763 | return a.logical_invert(context=self) |
| 4764 | |
| 4765 | def logical_or(self, a, b): |
| 4766 | """Applies the logical operation 'or' between each operand's digits. |
| 4767 | |
| 4768 | The operands must be both logical numbers. |
| 4769 | |
| 4770 | >>> ExtendedContext.logical_or(Decimal('0'), Decimal('0')) |
| 4771 | Decimal('0') |
| 4772 | >>> ExtendedContext.logical_or(Decimal('0'), Decimal('1')) |
| 4773 | Decimal('1') |
| 4774 | >>> ExtendedContext.logical_or(Decimal('1'), Decimal('0')) |
| 4775 | Decimal('1') |
| 4776 | >>> ExtendedContext.logical_or(Decimal('1'), Decimal('1')) |
| 4777 | Decimal('1') |
| 4778 | >>> ExtendedContext.logical_or(Decimal('1100'), Decimal('1010')) |
| 4779 | Decimal('1110') |
| 4780 | >>> ExtendedContext.logical_or(Decimal('1110'), Decimal('10')) |
| 4781 | Decimal('1110') |
| 4782 | >>> ExtendedContext.logical_or(110, 1101) |
| 4783 | Decimal('1111') |
| 4784 | >>> ExtendedContext.logical_or(Decimal(110), 1101) |
| 4785 | Decimal('1111') |
| 4786 | >>> ExtendedContext.logical_or(110, Decimal(1101)) |
| 4787 | Decimal('1111') |
| 4788 | """ |
| 4789 | a = _convert_other(a, raiseit=True) |
| 4790 | return a.logical_or(b, context=self) |
| 4791 | |
| 4792 | def logical_xor(self, a, b): |
| 4793 | """Applies the logical operation 'xor' between each operand's digits. |