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 josh.r
Recipients arigo, brandtbucher, josh.r, pablogsal, rhettinger, serhiy.storchaka, tim.peters
Date 2019-03-13.23:25:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1552519540.39.0.414393262716.issue36229@roundup.psfhosted.org>
In-reply-to
Content
Raymond said: "FWIW, the non-operator versions of these operations already support passing in multiple arguments and is the preferred way to do it."

True for sets with union/intersection/difference (and their inplace equivalents), but not for lists and bytearrays, which don't have an out-of-place version, and the in-place version, extend, only takes a single iterable argument.

Perhaps extend could be take multiple iterables as positional varargs, not just a single iterable, to make the multi-extend case work efficiently?

Not sure how often this actually comes up though; maybe I've just internalized good practices, but I only rarely find myself combining containers where the left-most operand is an unreferenced temporary, or combining many containers at once in a single line (I use itertools.chain wrapped in a constructor, or literals with the unpacking generalization for most of those cases).
History
Date User Action Args
2019-03-13 23:25:40josh.rsetrecipients: + josh.r, tim.peters, arigo, rhettinger, serhiy.storchaka, pablogsal, brandtbucher
2019-03-13 23:25:40josh.rsetmessageid: <1552519540.39.0.414393262716.issue36229@roundup.psfhosted.org>
2019-03-13 23:25:40josh.rlinkissue36229 messages
2019-03-13 23:25:39josh.rcreate