Message248475
To elaborate more on my second point (“No reentrant iterables are necessary here, only iterables with a __len__”)
What i meant here is that inside a call of chain(*iterables), such as chain(foo, bar, *baz_generator()), the paramter “iterables” is always a tuple, i.e. a sequence.
So it is always possible to just call len() on each element of “iterables” and either get a ValueError or a collection of summable integers.
With other itertools functions, we’d need to determine beforehand if we have reentrant iterables or not. This might be a problem, and for some too un-lazy (e.g. groupby)
But at the very very least, we could implement this for everything where i didn’t write “(r)”: map, accumulate, chain, islice, starmap, tee, product, permutations, combinations, combinations_with_replacement |
|
Date |
User |
Action |
Args |
2015-08-12 21:31:38 | flying sheep | set | recipients:
+ flying sheep, steven.daprano, r.david.murray |
2015-08-12 21:31:37 | flying sheep | set | messageid: <1439415097.99.0.771393095383.issue24849@psf.upfronthosting.co.za> |
2015-08-12 21:31:37 | flying sheep | link | issue24849 messages |
2015-08-12 21:31:37 | flying sheep | create | |
|