a.index(float('nan')) fails

Cameron Simpson cs at zip.com.au
Fri Oct 26 01:57:17 EDT 2012


On 25Oct2012 22:04, Terry Reedy <tjreedy at udel.edu> wrote:
| Containment of nan in collection is tested by is, not ==.
|  >>> nan = float('nan')
|  >>> nan2 = float('nan')
|  >>> nan2 is nan
| False

This argues otherwise, and for use of math.isnan() instead.

I expect you were making the point that another NaN is distinct, but it
didn't seem clear to me.

Cheers,
-- 
Cameron Simpson <cs at zip.com.au>

In article 1t8n9hINNq9j at dns1.NMSU.Edu, mcrider at acca.nmsu.edu (Mcrider) writes:
>Could one of you physicist-type cyber-riders give a lucid description/
>explanation of what some folks loosely refer to as a 'tank-slapper'?

An undamped oscillation of camber thrust, with positive feedback,
applied to the front contact patch?  :^)
        - Ed Green, Ed.Green at East.Sun.COM, DoD#0111



More information about the Python-list mailing list