On Sat, Dec 7, 2013 at 2:27 PM, Roy Smith <r...@panix.com> wrote: > -------------------------------------------------- > extracols = sorted(set.union(*(set(t.data.keys()) for t in tracks))) if > tracks else [] > -------------------------------------------------- > c2s = compids2songs(set(targets.keys()) | > set.union(*map(set,targets.itervalues())),self.docmap,self.logger) if > targets else {}
Easy rewrites: extracols = tracks and sorted(set.union(*(set(t.data.keys()) for t in tracks))) Assumes that tracks is a list, which it most likely is given the context. Parallel with the other. ChrisA -- https://mail.python.org/mailman/listinfo/python-list