摘要:
作用:断言函数运行状态 语法:assert condition,判断condition运行状态,若condition状态为false,则上报错误:AssertionError 阅读全文
摘要:
1 class Fib(object): 2 3 def __init__(self): 4 self.a,self.b=0,1 5 6 def __iter__(self): 7 return self 8 9 def __next__(self): 10 self.a,self.b=self.b 阅读全文