[Python-Dev] Not-a-Number

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Apr 29 03:18:55 CEST 2011


Taking a step back from all this, why does Python allow
NaNs to arise from computations *at all*?
+Inf and -Inf are arguably useful elements of the algebra,
yet Python insists on raising an exception for 1.0./0.0
instead of returning an infinity.
Why do this but not raise an exception for any operation
that produces a NaN?
-- 
Greg


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /