python捕獲所有異常怎麼寫 python中捕獲線程拋出的異常
- 經驗
- 關注:1.16W次
except (IDontLIkeYouException, YouAreBeingMeanException) as e:pass用逗號分割的方法只能在Python2.6和2.7裏好使,在Python3中則無效;
- 文章版權屬於文章作者所有,轉載請註明 https://xiumeifan.com/zh-hk/shenghuo/jingyan/jmry17.html
except (IDontLIkeYouException, YouAreBeingMeanException) as e:pass用逗號分割的方法只能在Python2.6和2.7裏好使,在Python3中則無效;