Message226134
The behavior is according to the specification:
http://speleotrove.com/decimal/decarith.html
The idea behind it is that 1/0 can be reasonably defined as infinity,
whereas 0/0 is undefined. You can see that if you disable the exceptions:
>>> c = getcontext()
>>> c.traps[DivisionByZero] = False
>>> c.traps[InvalidOperation] = False
>>>
>>> Decimal(1) / 0
Decimal('Infinity')
>>> Decimal(0) / 0
Decimal('NaN')
>>> |
|
Date |
User |
Action |
Args |
2014-08-30 10:17:32 | skrah | set | recipients:
+ skrah, rhettinger, facundobatista, mark.dickinson, akima |
2014-08-30 10:17:32 | skrah | set | messageid: <1409393852.44.0.912216664369.issue22306@psf.upfronthosting.co.za> |
2014-08-30 10:17:32 | skrah | link | issue22306 messages |
2014-08-30 10:17:32 | skrah | create | |
|