(objs, fn)
return result
Itertools.groupby returns a transient iterator with alien
    data types in it. This returns a dictionary of lists.
    Less efficient but clients can write naturally and used
    only for things that have to fit in memory easily anyhow.
Itertools.groupby returns a transient iterator with alien
    data types in it. This returns a dictionary of lists.
    Less efficient but clients can write naturally and used
    only for things that have to fit in memory easily anyhow.
Itertools . groupby returns a transient iterator with alien data types in it . This returns a dictionary of lists . Less efficient but clients can write naturally and used only for things that have to fit in memory easily anyhow .
def _group_by_dict(objs, fn):
    """
    Itertools.groupby returns a transient iterator with alien
    data types in it. This returns a dictionary of lists.
    Less efficient but clients can write naturally and used
    only for things that have to fit in memory easily anyhow.
    """
    result = defaultdict(list)
    for obj in objs:

        key = fn(obj)
        result[key].append(obj)
    return result
def _group_by_dict ( objs , fn ) : result = defaultdict ( list ) for obj in objs : key = fn ( obj ) result [ key ] . append ( obj ) return result