我觉得很奇怪
with open(file, 'r')
可以举报
FileNotFoundError: [Errno 2]
但我无法以某种方式捕捉到并继续。我在这里遗漏了什么,还是真的希望您在 with open() 之前使用 isfile() 或类似的东西?
python python-3.x
python ×1
python-3.x ×1