John> Is there a better way to test for NaN than John> str(p1)=='nan' John> where p1 is a float? Saw this in the list archives earlier today: >>> inf = float("1e9999") >>> inf Inf >>> nan = inf-inf >>> nan NaN >>> p1 = 5.0 >>> p1 == nan False Skip