标签云

微信群

扫码加入我们

WeChat QR Code


This is platinum: stackoverflow.com/questions/231767/…

2018年10月23日13分19秒

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?

2018年10月23日13分19秒

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.

2018年10月23日13分19秒

fib is still a function. type(fib) = <type 'function'>.

2018年10月23日13分19秒