python 2.x 错误 ‘generator’ object has no attribute ‘_F_hawk189_新浪博客
斐波那契数列:deff():a,b=1,1whileTrue:yieldaa,b=b,a+ba=f()foriinrange(10):print(a.___next___(),'')AttributeError:'generator'objecthasnoattribute'___next___'原因是在python3.x中generator(有yield关键字的函数则会被识别为generator