[Python-ideas] Making min and max behave more like any and all
Yuval Greenfield
ubershmekel at gmail.com
Wed Nov 30 19:06:39 CET 2011
On Wed, Nov 30, 2011 at 7:30 PM, Jakob Bowyer <jkbbwr at gmail.com> wrote:
> I just had something pointed out to me in #python that min and max accept
> *args, I know for a fact that any and all only use a single iterable
> password.
> Shouldn't we allow either one of the two ideas?
>
>
any(True, False, True)
all(False, True, True)
max(1,2,3,4)
min(1,2,3,4)
sum(1,2,3,4)
list(1,2,3,4)
set(1,2,3,4)
TOOWTDI would mean to allow only one argument in all of the above.
Currently only max/min break the rule.
I'm +1 for making python consistent. And specifically would be +0 for
allowing it all.
--Yuval
Btw even enumerate could have been a candidate though it already has a
second argument.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20111130/d871228c/attachment.html>
More information about the Python-ideas
mailing list