On Tue, Aug 1, 2017 at 6:01 AM, Louie Lu <m...@louie.lu> wrote:

> [...]
> I'm not sure if this is discuss before, but can "any" and "all"
> support like min_max "arg1, arg2, *args" style?
>

Can this be done consistently? For example consider x=[[]]. Then all(x)
where x is interpreted as an iterable should be False, but all(x) where x
is interpreted as a single argument should be True. This inconsistency
already exists for max:

>>> max({1, 2})
2
>>> max({1, 2}, {1})
set([1, 2])

However, it doesn't seem like there's a good reason to add an inconsistency
to the API for any/all.

- Lucas
_______________________________________________
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