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
> 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.
Christopher Barker, Ph.D.
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
Python-ideas mailing list
Code of Conduct: http://python.org/psf/codeofconduct/