Final state of underlying sequence in islice
ian.g.kelly at gmail.com
Fri Nov 5 23:52:18 CET 2010
On Nov 5, 2:51 pm, Raymond Hettinger <pyt... at rcn.com> wrote:
> You may have missed my point. I wrote the tools, the docs, and the
> If you interpret a "promise" in text, I can assure you it was not
> intended. The behavior *is* undefined because I never defined it.
> I'm happy to clarify the docs to make that explicit.
Does the existence of a test case imply a guarantee?
# Test number of items consumed SF #1171417
it = iter(range(10))
self.assertEqual(list(islice(it, 3)), range(3))
self.assertEqual(list(it), range(3, 10))
More information about the Python-list