[Python-ideas] Where should grouping() live (was: grouping / dict of lists)

Cammil Taank ctaank at gmail.com
Fri Jul 6 04:49:37 EDT 2018


The way I see grouping is as an aggregation operation. As such, in my head,
grouping is similar to min/max. However, if builtins are a no-go, then I
feel I need to think a little outside the box:

Is there a possibility that there will be desired many more aggregate
functions in the near future? Is there a case for collecting aggregate
functions into another top level module? Also, I would consider statistics
to have similarities - median, mean etc are aggregate functions. Histograms
are also doing something similar to grouping.

Apologies I have not offered any concrete suggestions, but just thought I
should offer my thoughts.

On Thu, 5 Jul 2018, 22:24 Chris Barker via Python-ideas, <
python-ideas at python.org> wrote:

> On Thu, Jul 5, 2018 at 3:26 AM, David Mertz <mertz at gnosis.cx> wrote:
>
>> Yes, he said a definite no to a built-in. But he expressed a less
>> specific lack of enthusiasm for collections classes (including Counter,
>> which exists and which I personally use often).
>>
>
> And a Grouping class would do more than Counter, which I find trivial
> enough that I generally don't bother to use it.
>
> -CHB
> --
>
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> Chris.Barker at noaa.gov
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180706/af25f266/attachment.html>


More information about the Python-ideas mailing list