On 1 August 2017 at 23:24, Paul Moore <p.f.mo...@gmail.com> wrote: > On 1 August 2017 at 14:01, 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? > > I don't see any particular reason why not, but is there a specific use > case for this or is it just a matter of consistency? Unlike max and > min, we already have operators in this case (and/or). I'd imagine that > if I had a use for any(a, b, c) I'd write it as a or b or c, and for > all(a, b, c) I'd write a and b and c.
Right, the main correspondence here is with "sum()": folks can't write "sum(a, b, c)", but they can write "a + b + c". The various container constructors are also consistent in only taking an iterable, with multiple explicit items being expected to use the syntactic forms (e.g. [a, b, c], {a, b, c}, (a, b, c)) The same rationale holds for any() and all(): supporting multiple positional arguments would be redundant with the existing binary operator syntax, with no clear reason to ever prefer one option over the other. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/