qwjqwj <q...@papayamobile.com> added the comment: More experiments: The tuple pair (10,20) don't correspond to (i,i*i) The yield order is distorted
>>> x = (((yield i),(yield i*i)) for i in range(3)) >>> x.__next__() 0 >>> x.send(10) 0 >>> x.send(20) (10, 20) >>> x.send(30) 1 >>> x.send(40) 1 >>> x.send(60) (40, 60) >>> x.send(70) 2 >>> x.send(80) 4 >>> x.send(90) (80, 90) >>> x.send(100) Traceback (most recent call last): File "<pyshell#107>", line 1, in <module> x.send(100) StopIteration ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5577> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com