View Single Post
Old 05-09-2011, 09:17 AM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,465
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Just for grins, what happens if you change that code to be:
Code:
for r in reversed(results):
    ans.identifiers.update(r.identifiers)
My thought is that if results is sorted highest-priority first, then processing them in reverse will leave the one you want. However, if identifiers is not ordered, then this suggestion is bogus.

EDIT: Never mind. 'results' is not a list.

Last edited by chaley; 05-09-2011 at 09:21 AM.
chaley is offline   Reply With Quote