On Mar 14, 9:52 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > res_dict = dict((r.get_id(), r) for r in res_list) > > or if you have to be compatible with older python versions: > > res_dict = dict([(r.get_id(), r) for r in res_list])
Yep, that works. Strange, I was sure I had tested the latter, but I must have been doing something wrong. Thanks for your help! -Samuel -- http://mail.python.org/mailman/listinfo/python-list