Hi,<br><br>Using generator recursively is not doing what I expect:<br><br>def test_gen(x):<br>    yield x<br>    x = x - 1<br>    if x != 0:<br>        test_gen(x)<br><br>for item in test_gen(3):<br>    print item<br><br><br>
This gives me a single number 3 and not printing 2 and 1 as I would expect.<br><br>What is wrong??<br><br>Timothy<br>