在python中检测函数错误,具体方法如下:
x = 0
lis_y = [i for i in range(64,90)]
def test(x,y):
print (x+y)
def test1(x,y):
print( x*y)
try:
while x < 20:
for y in lis_y:
test(x,y)
test1(x,chr(y))
x+=1
except:
print ('Error')
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:如何检测c++ strcat函数错误