> {k: v for d in my_list if d['key'] == value for (k, v) in d.items()} Ugh, had part of that backwards:) Nice!
> However, since you say that all dicts have a unique value for > z['key'], you should never need to actually merge two dicts, correct? > In that case, why not just use a plain for loop to search for the > dict? The reason is that I need several of these in an init function and they stack up nicely where as the loops get unruly in length, but I don't disagree. -- http://mail.python.org/mailman/listinfo/python-list