Ah, that's a great point. Thanks. I guess range was never an Iterator,
which is a key difference.
On Wed, Sep 30, 2015 at 1:33 PM Serhiy Storchaka
On 30.09.15 20:18, Neil Girdhar wrote:
Ah good point. Well, in the case of a sequence argument, an enumerate object could be both a sequence and an iterator.
It can't be.
For sequence:
x = 'abcd' list(zip(x, x)) [('a', 'a'), ('b', 'b'), ('c', 'c'), ('d', 'd')]
For iterator:
x = iter('abcd') list(zip(x, x)) [('a', 'b'), ('c', 'd')]
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
--
--- You received this message because you are subscribed to a topic in the Google Groups "python-ideas" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/python-ideas/x1omibxxcMw/unsubscribe. To unsubscribe from this group and all its topics, send an email to python-ideas+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.