Message337884
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). |
|
Date |
User |
Action |
Args |
2019-03-13 23:25:40 | josh.r | set | recipients:
+ josh.r, tim.peters, arigo, rhettinger, serhiy.storchaka, pablogsal, brandtbucher |
2019-03-13 23:25:40 | josh.r | set | messageid: <1552519540.39.0.414393262716.issue36229@roundup.psfhosted.org> |
2019-03-13 23:25:40 | josh.r | link | issue36229 messages |
2019-03-13 23:25:39 | josh.r | create | |
|