利用import语句 输入 sys模块。
import sys
def fibonacci(n, w = 0):
a, b, counter = 0, 1, 0
while True:
if (counter > 0):
return
yield a
a, b = b, a + b
print("%d, %d" % (a, b))
counter += 1
f = fibonacci(10, 0)
while True:
try:
print(next(f), end=" ")
except:
sys.exit()
ERROR:root:Internal Python error in the inspect module.
TypeError: object of type 'NoneType' has no len()
TypeError:是数据类型错误,具体要看你的全部异常信息才能确定