Message403027
How is Counter(numbers, key=abs) any better than Counter(map(abs, numbers))?
It seems to me that "apply a function to each thing" (map) and "count the numbers of each thing" (Counter) are two orthogonal concepts, and there's no reason to entangle them. Their composition as "count the number of things with each function value" is probably better as a composition of two simple things rather than lumped together. I believe this is related to why PEP 455 was rejected. |
|
Date |
User |
Action |
Args |
2021-10-01 19:24:18 | Dennis Sweeney | set | recipients:
+ Dennis Sweeney, kubataytekin |
2021-10-01 19:24:18 | Dennis Sweeney | set | messageid: <1633116258.71.0.808326775891.issue45338@roundup.psfhosted.org> |
2021-10-01 19:24:18 | Dennis Sweeney | link | issue45338 messages |
2021-10-01 19:24:18 | Dennis Sweeney | create | |
|