Difference between IOError and OSError?

前端 未结 2 1233
长情又很酷
长情又很酷 2021-02-05 00:36

I am always getting confused on whether a function would raise an IOError or OSError (or both?). What is the principle rule behind these exception types, what is the difference

2条回答
  •  说谎
    说谎 (楼主)
    2021-02-05 01:16

    There's no difference between IOError and OSError cause they mostly appear on similar commands like opening a file or removing one.

提交回复
热议问题