Turn off ZeroDivisionError?

Jeff Schwab jeff at schwabcenter.com
Fri Feb 15 14:41:47 EST 2008


Steve Holden wrote:
> Mark Dickinson wrote:
>> On Feb 14, 11:09 pm, John Nagle <na... at animats.com> wrote:
>>>      You also need to think about how conditionals interact with
>>> quiet NANs.  Properly, comparisons like ">" have three possibilities:
>>
>> True.  There was a recent change to Decimal to make comparisons (other
>> than !=, ==) with NaNs do the "right thing":  that is, raise a Python
>> exception, unless the Invalid flag is not trapped, in which case they
>> return False (and also raise the Invalid flag).  I imagine something
>> similar would make sense for floats.
>>
>>> True, False, and "raise".  Many implementations don't do that well,
>>> which means that you lose trichotomy.  "==" has issues; properly,
>>> "+INF" is not equal to itself.
>>
>> I don't understand:  why would +INF not be equal to itself?  Having
>> INF == INF be True seems like something that makes sense both
>> mathematically and computationally.
>>  [...]
> 
> There are an uncountable number of infinities, all different.

+ALEPH0?



More information about the Python-list mailing list