About

Welcome to Panela, Matt Harrison's take on mostly Open Source, Linux, Python, innovation in those areas, other buzzwords and Dick Proenneke. It comes complete with the illustrations as needed. Note the opinions expressed here are merely my opinions and not the opinions of my employer.

about Matt

Calendar

««Jul 2008»»
SMTWTFS
   12345
6789101112
13141516171819
20212223242526
2728293031

My Top Tags

                                       

Mailing List

My RSS Feeds








All your comments are belong to reddit

posted 2007.06.18 Mon

I guess this has been around since the dawn of site aggregation (ala slashdot). I'm just sort of frustrated that my previous post's most valuable and relevant comments weren't posted on my blog but on an aggregator of programming links (reddit). I'm not implying that reddit isn't useful for finding interesting fodder every so often, it is just annoying that relevant comments to your post have a further degree of separation your post. So unless you have someone nice who actually bridges the comments to your post(like Fredrik) you might never see those useful posts.

[end rant...]

tags:    

links: digg this    del.icio.us    reddit




1. Michael Hudson left...
2007.06.19 Tue 5:55 am

Well, as consolation, have a proper answer to your previous question:

def isnan(v):

  • return v != v*1.0 or (v == 1.0 and v == 2.0)

This has been tested with Python 2.3, 2.4 and 2.5 on Windows, Linux and OS X and probably works on many. If you don't care about older Python versions

def isnan(v):

  • return v != v*1.0

is enough. The "*1.0" bit is so you don't compare the same objects (in the sense of 'is'), x!=x will always return False.