I\'m playing around with generators and generator expressions and I\'m not completely sure that I understand how they work (some reference material):
>>
The generator you wrote is equivalent to the more verbose:
def testing():
for x in range(10):
x = (yield x)
yield x
As you can see here, the second yield
, which is implicit in the generator expression, does not save the value you pass it, therefore depending on where the generator execution is blocked the send
may or may not work.