import requests
for i in range(0, 5):
try:
1 / 1
except (Exception, requests.exceptions.ProxyError) as e:
print(e)
else:
print("success")
continue
print("niubi")
finally:
print("finally")
实际上可以运行代码发现 niubi 并未打印, 打印了 finally, 即 continue 不会打断 finally 的执行 但是 之后的代码确实不执行