On Mon, Jul 9, 2018 at 3:38 PM, David Mertz <me...@gnosis.cx> wrote:

> In my mind, I *rarely* (which is more than never) have my data in the form
> of a sequence of key/value pairs.  The version of the API that assumes data
> starts that way feels like either a niche case, or demands preprocessing
> before it's ready to pass to grouping() or collections.Grouping().
>

sure, but it makes it easy to use a different approach -- i.e. a
comprehension with expressions rather than a key (and maybe value)
function. AT least two people have expressed a preference for that.

That said, an identity key is rarely interesting either.
>

is it EVER interesting?? wouldn't it be essentially a Counter, without the
counting? :-)



> So I think have key=None mean "assume we get key/val pairs is harmless to
> the more common case where we give an explicit key function.
>

I'm not sure we'll know what's more common 'till it's loose in the wild --
any problem can be solved either way -- which one will people prefer?

Given that there Is a preference for comprehensions over map() -- I think
it will see a lot of use.

-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.bar...@noaa.gov
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to