diff options
Diffstat (limited to 'Modules/_io/_iomodule.c')
| -rw-r--r-- | Modules/_io/_iomodule.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c index bc2fb32..f0621f4 100644 --- a/Modules/_io/_iomodule.c +++ b/Modules/_io/_iomodule.c @@ -61,7 +61,7 @@ PyDoc_STRVAR(module_doc, "At the top of the I/O hierarchy is the abstract base class IOBase. It\n" "defines the basic interface to a stream. Note, however, that there is no\n" "separation between reading and writing to streams; implementations are\n" -"allowed to raise an IOError if they do not support a given operation.\n" +"allowed to raise an OSError if they do not support a given operation.\n" "\n" "Extending IOBase is RawIOBase which deals simply with the reading and\n" "writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide\n" @@ -107,7 +107,7 @@ _io.open closefd: bool(accept={int}) = True opener: object = None -Open file and return a stream. Raise IOError upon failure. +Open file and return a stream. Raise OSError upon failure. file is either a text or byte string giving the name (and the path if the file isn't in the current working directory) of the file to @@ -231,7 +231,7 @@ static PyObject * _io_open_impl(PyObject *module, PyObject *file, const char *mode, int buffering, const char *encoding, const char *errors, const char *newline, int closefd, PyObject *opener) -/*[clinic end generated code: output=aefafc4ce2b46dc0 input=7f81b2a1d3b02344]*/ +/*[clinic end generated code: output=aefafc4ce2b46dc0 input=03da2940c8a65871]*/ { unsigned i; @@ -656,7 +656,7 @@ PyInit__io(void) if (PyModule_AddIntMacro(m, DEFAULT_BUFFER_SIZE) < 0) goto fail; - /* UnsupportedOperation inherits from ValueError and IOError */ + /* UnsupportedOperation inherits from ValueError and OSError */ state->unsupported_operation = PyObject_CallFunction( (PyObject *)&PyType_Type, "s(OO){}", "UnsupportedOperation", PyExc_OSError, PyExc_ValueError); |
