itertools product(infinite iterator) hangs
I've been staring at this for a little while:
from itertools import product
i = 1
i += 1
N = Naturals()
print(product(N)) # <--- hangs
When I run the above the call to product hangs but I can't see why. I
would expect that since I'm not iterating over the product it would
just call iter(N) but clearly not since iter(N) returns a generator
instantly where as product(N) hangs.
What am I missing?