This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients sedrubal, serhiy.storchaka, steven.daprano
Date 2017-02-03.13:38:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1486129134.8.0.10373232361.issue29433@psf.upfronthosting.co.za>
In-reply-to
Content
Serhiy, that doesn't generalise to code like:

    any(a, b, c, *extras)

which is hard to write out by hand. You would have to say 

    bool(a or b or c or any(extras))

I think this might be worth considering on Python-Ideas. It will probably be rejected, but if Sedrubal cares enough to raise the idea, it could be discussed.

However, sum should be taken off the list. The problem with accepting variadic args is that it clashes with current behaviour:

    sum( [[1], [2], [3]], [4, 5] )

That would be ambiguous. Under the suggested variadic form, that should return a list:

    [[1], [2], [3], 4, 5]

but it already has a meaning in Python today:

    [4, 5, 1, 2, 3]


So sum() with variadic args would be ambiguous, or would break backwards compatibility. Neither of those would be acceptable.
History
Date User Action Args
2017-02-03 13:38:54steven.dapranosetrecipients: + steven.daprano, serhiy.storchaka, sedrubal
2017-02-03 13:38:54steven.dapranosetmessageid: <1486129134.8.0.10373232361.issue29433@psf.upfronthosting.co.za>
2017-02-03 13:38:54steven.dapranolinkissue29433 messages
2017-02-03 13:38:54steven.dapranocreate