Raymond Hettinger added the comment:
> I don't think it makes sense to add key arguments to mode, mean,
> variance etc. I'm having trouble thinking of what that would
> even mean
I concur. This proposal bends the concept of a key-function to where it is no
longer obvious what it does.
> I've given this some more thought, and I think that a "key"
> argument would make sense for a general selection function.
Yes, that would make sense:
select(A, k, key=somefunc) == sorted(A, key=somefunc)[k]
----------
nosy: +rhettinger
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue30999>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com