On Jun 4, 4:29 am, Nobody <nob...@nowhere.com> wrote: > On Fri, 03 Jun 2011 14:52:39 +0000, Grant Edwards wrote: > >> It's arguable that NaN itself simply shouldn't exist in Python; if > >> the FPU ever generates a NaN, Python should raise an exception at > >> that point. >
> > If you're "fluent" in IEEE-754, then you won't find its behaviour > unexpected. OTOH, if you are approach the issue without preconceptions, > you're likely to notice that you effectively have one exception mechanism > for floating-point and another for everything else. Three actually: None, nan and exceptions Furthermore in boolean contexts nan behaves like True whereas None behaves like false. -- http://mail.python.org/mailman/listinfo/python-list