Steven D'Aprano <st...@pearwood.info> writes:

> Robert Kern wrote:
> > On 4/28/11 8:44 PM, Steven D'Aprano wrote:
> >> The real question should be, why does Python treat all NANs as
> >> signalling NANs instead of quiet NANs? I don't believe this helps
> >> anyone.
> >
> > Actually, Python treats all NaNs as quiet NaNs and never signalling NaNs.
>
> Sorry, did I get that backwards? I thought it was signalling NANs that
> cause a signal (in Python terms, an exception)?
>
> If I do x = 0.0/0 I get an exception instead of a NAN. Hence a
> signalling NAN.

Robert has interpreted your “treats all NaNs as signalling NaNs” to mean
“treats all objects that Python calls a NaN as signalling NaNs”, and is
pointing out that no, the objects that Python calls “NaN” are all quiet
NaNs.

You might be clearer if you distinguish between what Python calls a NaN
and what you call a NaN. It seems you're saying that some Python
exception objects (e.g. ZeroDivisionError objects) are what you call
NaNs, despite the fact that they're not what Python calls a NaN.

-- 
 \             “We can't depend for the long run on distinguishing one |
  `\         bitstream from another in order to figure out which rules |
_o__)               apply.” —Eben Moglen, _Anarchism Triumphant_, 1999 |
Ben Finney

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to