This is platinum: stackoverflow.com/questions/231767/…
I did not know that a function was not a generator. Is there a link you can point me to that explains the difference between them?
Quick Googling reveals this and this. That was more a subsidiary point though: the code would work just as well if fib was a normal function that returns [1, 2, 3, 4], the for would still iterate through it.
fib is still a function. type(fib) = <type 'function'>.