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 flying sheep
Recipients flying sheep, r.david.murray, steven.daprano
Date 2015-08-12.21:31:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1439415097.99.0.771393095383.issue24849@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2015-08-12 21:31:38flying sheepsetrecipients: + flying sheep, steven.daprano, r.david.murray
2015-08-12 21:31:37flying sheepsetmessageid: <1439415097.99.0.771393095383.issue24849@psf.upfronthosting.co.za>
2015-08-12 21:31:37flying sheeplinkissue24849 messages
2015-08-12 21:31:37flying sheepcreate