Re: [Python-ideas] Fwd: Allow a group by operation for dict comprehension

2018-06-29 Thread Michael Selik
I created a separate thread to continue this discussion: "grouping / dict of lists" https://github.com/selik/peps/blob/master/pep-.rst In my proposal, the update offers a key-function in case the new elements don't follow the same pattern as the existing ones. I can understand the view that

Re: [Python-ideas] Fwd: Allow a group by operation for dict comprehension

2018-06-29 Thread MRAB
On 2018-06-29 05:14, David Mertz wrote: Mike Selik asked for my opinion on a draft PEP along these lines. I proposed a slight modification to his idea that is now reflected in his latest edits. With some details fleshed out, I think this is a promising idea. I like the a collections class

[Python-ideas] Fwd: Allow a group by operation for dict comprehension

2018-06-28 Thread David Mertz
Mike Selik asked for my opinion on a draft PEP along these lines. I proposed a slight modification to his idea that is now reflected in his latest edits. With some details fleshed out, I think this is a promising idea. I like the a collections class better, of course, but a dict classmethod is