标签:返回 bsp __init__ ext span def 调用 code 循环
class Fibs(Object): def __init__(self): self.a = 0 self.b = 1 def next(self): self.a, self.b = self.b, self.a+self.b return self.a def __iter__(self): return self fibs = Fibs() for f in fibs: if f >20: print f break
标签:返回 bsp __init__ ext span def 调用 code 循环
原文地址:https://www.cnblogs.com/mujiujiu/p/9280064.html