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 firstname.lastname@example.org wrote:
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.
x = 'abcd' list(zip(x, x))
[('a', 'a'), ('b', 'b'), ('c', 'c'), ('d', 'd')]
x = iter('abcd') list(zip(x, x))
[('a', 'b'), ('c', 'd')]
Python-ideas mailing list Pythonemail@example.com 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 firstname.lastname@example.org. For more options, visit https://groups.google.com/d/optout.