<div dir="ltr">Ah, that's a great point. Thanks. I guess range was never an Iterator, which is a key difference.<br><br><div class="gmail_quote"><div dir="ltr">On Wed, Sep 30, 2015 at 1:33 PM Serhiy Storchaka <<a href="mailto:storchaka@gmail.com">storchaka@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 30.09.15 20:18, Neil Girdhar wrote:<br>
> Ah good point. Well, in the case of a sequence argument, an enumerate<br>
> object could be both a sequence and an iterator.<br>
<br>
It can't be.<br>
<br>
For sequence:<br>
<br>
 >>> x = 'abcd'<br>
 >>> list(zip(x, x))<br>
[('a', 'a'), ('b', 'b'), ('c', 'c'), ('d', 'd')]<br>
<br>
For iterator:<br>
<br>
 >>> x = iter('abcd')<br>
 >>> list(zip(x, x))<br>
[('a', 'b'), ('c', 'd')]<br>
<br>
<br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
<br>
--<br>
<br>
---<br>
You received this message because you are subscribed to a topic in the Google Groups "python-ideas" group.<br>
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/python-ideas/x1omibxxcMw/unsubscribe" rel="noreferrer" target="_blank">https://groups.google.com/d/topic/python-ideas/x1omibxxcMw/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href="mailto:python-ideas%2Bunsubscribe@googlegroups.com" target="_blank">python-ideas+unsubscribe@googlegroups.com</a>.<br>
For more options, visit <a href="https://groups.google.com/d/optout" rel="noreferrer" target="_blank">https://groups.google.com/d/optout</a>.<br>
</blockquote></div></div>