misc. code/test improvements
misc. code/test improvements

- use id(foo) == id(bar) to check identity equivalence rather than foo == bar
- prefer tuples to lists when iterating (in case it matters)
- sum(1 for x in l if cond) is nicer than len(filter(lambda: cond, l))

ltucker/giblets