andrea crotti writes:
> It's very weird though this sharing and still doesn't really look
> rightl, is it done just for performance reasons?
It could consume unbounded amounts of memory otherwise. E.g. if there
are millions of items in the group.
If you're not worried about that situation it's
2013/2/26 Ian Kelly :
> On Tue, Feb 26, 2013 at 9:27 AM, andrea crotti
> wrote:
>> So I was trying to use groupby (which I used in the past), but I
>> noticed a very strange thing if using list on
>> the result:
>
> As stated in the docs:
>
> """
> The returned group is itself an iterator that sha
On Tue, Feb 26, 2013 at 9:27 AM, andrea crotti
wrote:
> So I was trying to use groupby (which I used in the past), but I
> noticed a very strange thing if using list on
> the result:
As stated in the docs:
"""
The returned group is itself an iterator that shares the underlying
iterable with grou