Peter Otten <[EMAIL PROTECTED]> writes: > > Â Â for s_name, series in serialized: > > Â Â Â grouped = groupby(series, keyfunc) > > Â Â Â regrouped = ((k, (v[1] for v in g)) for (k,g) in grouped) > > Â Â Â serieses.append((s_name, regrouped)) > > You are trying to store a group for later consumption here.
Good catch, the solution is to turn that loop into a generator, but then it has to be consumed very carefully. This stuff maybe presses the limits of what one can do with Python iterators while staying sane. -- http://mail.python.org/mailman/listinfo/python-list