Message217746
Itertools would benefit greatly from a function (which I've named intersperse, after Haskell's equivalent) for yielding the items of an iterator with a given value placed between each. Sort of a str.join-like function, but for arbitrary sequences.
Something like:
>>> list(itertools.intersperse(1, [2, 3, 4]))
[2, 1, 3, 1, 4] |
|
Date |
User |
Action |
Args |
2014-05-02 07:39:41 | javawizard | set | recipients:
+ javawizard |
2014-05-02 07:39:41 | javawizard | set | messageid: <1399016381.86.0.358283967216.issue21414@psf.upfronthosting.co.za> |
2014-05-02 07:39:41 | javawizard | link | issue21414 messages |
2014-05-02 07:39:40 | javawizard | create | |
|