Return (a // b, a % b). >>> ExtendedContext.divmod(Decimal(8), Decimal(3)) (Decimal('2'), Decimal('2')) >>> ExtendedContext.divmod(Decimal(8), Decimal(4)) (Decimal('2'), Decimal('0')) >>> ExtendedContext.divmod(8, 4) (Decimal('2'), Decimal('0')
(self, a, b)
| 4430 | return r |
| 4431 | |
| 4432 | def divmod(self, a, b): |
| 4433 | """Return (a // b, a % b). |
| 4434 | |
| 4435 | >>> ExtendedContext.divmod(Decimal(8), Decimal(3)) |
| 4436 | (Decimal('2'), Decimal('2')) |
| 4437 | >>> ExtendedContext.divmod(Decimal(8), Decimal(4)) |
| 4438 | (Decimal('2'), Decimal('0')) |
| 4439 | >>> ExtendedContext.divmod(8, 4) |
| 4440 | (Decimal('2'), Decimal('0')) |
| 4441 | >>> ExtendedContext.divmod(Decimal(8), 4) |
| 4442 | (Decimal('2'), Decimal('0')) |
| 4443 | >>> ExtendedContext.divmod(8, Decimal(4)) |
| 4444 | (Decimal('2'), Decimal('0')) |
| 4445 | """ |
| 4446 | a = _convert_other(a, raiseit=True) |
| 4447 | r = a.__divmod__(b, context=self) |
| 4448 | if r is NotImplemented: |
| 4449 | raise TypeError("Unable to convert %s to Decimal" % b) |
| 4450 | else: |
| 4451 | return r |
| 4452 | |
| 4453 | def exp(self, a): |
| 4454 | """Returns e ** a. |
nothing calls this directly
no test coverage detected