Traceback (most recent call last):
File "/Users/honzik/PycharmProjects/Toy/test.py", line 21, in main
raise IOError('Foo bar bazooka!')
OSError: Foo bar bazooka!
Changed in version 3.3: EnvironmentError, IOError, WindowsError,
VMSError, socket.error, select.error and mmap.error have been
merged into OSError, and the constructor may return a subclass.
IOError
只是Python3中OSError
的别名,请参见https://docs.python.org/3/library/exceptions.html#concrete-exceptions:相关问题 更多 >
编程相关推荐