I couldn't remember if generator expressions were available in python 2.6 and I figured converting the list to a set didn't save any performance/memory. However, I just looked up generator expressions and it appears that they've been around for a while. I'll change this.