[Yum-devel] [PATCH] make sure when we return items we sort the counts of things matched from the tagsdb into the rest of the matches. FIXME added to get rid of the silly sorting list as it appears to only want to make me cry

Seth Vidal skvidal at fedoraproject.org
Fri Mar 12 03:46:31 UTC 2010



On Thu, 11 Mar 2010, James Antill wrote:

>> +        # this bizarro sorted_lists format
>> +        # FIXME - stab sorted_lists in the chest at some later date
>> +        sorted_lists = {}
>> +        for pkg in results_by_pkg:
>
> I think you want to sort this, no?

Why? It's going to be sorted later. How does sorting it now, help?

>> +            count = len(totkeys)
>> +            if count not in sorted_lists:
>> +                sorted_lists[count] = []
>> +            sorted_lists[count].append((pkg, totkeys, totvals))
>
> Dito .setdefault().

.setdefault annoys me. I know it shouldn't but it does.

-sv



More information about the Yum-devel mailing list