On Tue, 15 Sep 2020 at 06:54, David Mertz <[email protected]> wrote:
>
> Thanks so much Ben for documenting all these examples. I've been frustrated 
> by the inconsistencies, but hasn't realized all of those you note.
>
> It would be a breaking change, but I'd really vastly prefer if almost all of 
> those OverflowErrors and others were simply infinities. That's much closer to 
> the spirit of IEEE-754.
>
> The tricky case is 1./0. Division is such an ordinary operation, and it's so 
> easy to get zero in a variable accidentally. That one still feels like an 
> exception, but yes 1/1e-323 vs. 1/1e-324 would them remain a sore spot.

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
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/M7AXLKSSKDOUC6AUIEGJC2HISJFHMV5H/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to