📜  何时使用 finally python 代码示例

📅  最后修改于: 2022-03-11 14:45:50.676000             🧑  作者: Mango

代码示例1
try:
    run_code1()
except TypeError:
    run_code2()
    return None   # The finally block is run before the method returns
finally:
    other_code()