Message84273
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 |
|
Date |
User |
Action |
Args |
2009-03-27 16:33:28 | qwjqwj | set | recipients:
+ qwjqwj, pitrou |
2009-03-27 16:33:28 | qwjqwj | set | messageid: <1238171608.03.0.996800305712.issue5577@psf.upfronthosting.co.za> |
2009-03-27 16:33:20 | qwjqwj | link | issue5577 messages |
2009-03-27 16:33:18 | qwjqwj | create | |
|