Why must I use a variable to obtain next() values from a Python generator?

```
    def my_gen():
    i = 0
    while i < 4:
         yield 2 * i
         i += 1

#p = my_gen()
#for i in range(4):
#    print(next(p))

##for i in range(4):
##    print(next(my_gen()))

```

In the above, the # block works, while the ## block returns 4 copies of the first "yield."