> We need to remember that a significant number of Python users don't
> have any idea what IEE-754 is, and have never heard of a NaN (and
> possibly even of infinity as a number). Those people are *far* better
> served by being told "you made a mistake" in the form of an exception,
> rather than via a weird numeric value that doesn't work how they
> expect and doesn't even look like a number when they print it.
>
> Paul

My feeling is that both viewpoints can be satisfied by having a context whereby 
if USE_IEEE_SPECIAL_VALUES (to pick a random name) is False (the default) such 
operations will raise an exception but if it is True INF, -INF or NaN is 
returned (ideally with some debug output – this would be in the spirit of the 
IEEE Signalling NaN).

Steve Barnes
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/IYQPDLIQTTT3PVIISM6NEXMRYOE2VQU3/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to