Thanks guys!

Miss sorting when reading docs.. (

However, I just create simple "groupby":

def groupby(_list, key_func):
    res = {}
    for i in _list:
        k = key_func(i)
        if k not in res:
            res[k] = [i]
        else:
            res[k].append(i)
    return res

and it works 3 times faster then itertools.groupby for my example (for
tests I extend number of profiles)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to