> Alan Isaac wrote: > > The current situation is: use a loop because the obvious generator > > approach is not efficient.
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "not efficient" compared to what ? I already guess that I've missed your point, but to prove it... I was referring to the beginning of this thread where George noted that palettes = dict((w,set(w)) for w in words) runs slower than palettes={} for w in words: palettes[w]=set(w) The reason seems obvious: the otiose tuple creation, but there is no "more efficient" syntax to use with 'dict'. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list