在 Python 中使用 bare raise 有什么意义
What is the point of using bare raise in Python
我正在尝试理解 this code 和以下模式的使用:
try:
...
except Exception:
raise
像这样重新引发异常有什么意义?如果删除整个 try-except 块,您不会得到相同的结果吗?
是的,该代码没有任何作用。
我正在尝试理解 this code 和以下模式的使用:
try:
...
except Exception:
raise
像这样重新引发异常有什么意义?如果删除整个 try-except 块,您不会得到相同的结果吗?
是的,该代码没有任何作用。