Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def map_(generator, keyfn):
    _map = defaultdict(list)
    for item in generator:
        _map[keyfn(item)].append(item)
    return _map
        


src/f/r/framboise-0.2/framboise/opensubtitles.py   framboise(Download)
import chksum
from sorting import DefaultSorter
from util import map_
 
USER_AGENT = 'framboise v0.2'
        self.sorter.movie, _ = os.path.splitext(os.path.basename(movie_file))
        if self.save_all or self.get_other:
            lmap = map_(results, keyfn=itemgetter('SubLanguageID'))
            bestl = {k: min(lmap[k], key=self.sorter.bestfn)
                     for k in lmap}