Can you explain me this behaviour: >>> s = [1,2,3,4,5] >>> g = (x for x in s) >>> next(g) 1 >>> s [1, 2, 3, 4, 5] >>> del s[0] >>> s [2, 3, 4, 5] >>> next(g) 3 >>>
Why next(g) doesn't give me 2? -- http://mail.python.org/mailman/listinfo/python-list
Can you explain me this behaviour: >>> s = [1,2,3,4,5] >>> g = (x for x in s) >>> next(g) 1 >>> s [1, 2, 3, 4, 5] >>> del s[0] >>> s [2, 3, 4, 5] >>> next(g) 3 >>>
Why next(g) doesn't give me 2? -- http://mail.python.org/mailman/listinfo/python-list