summaryrefslogtreecommitdiffstats
path: root/Modules/_io/clinic/iobase.c.h
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-03-31 07:21:56 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-03-31 07:21:56 (GMT)
commit754aab28ed5f94338641db8899f89f59895c2137 (patch)
tree79c911c8dd0bc6f25f0d454e3c26608579171fb8 /Modules/_io/clinic/iobase.c.h
parent8dc2ec1513e90a8d23394f1c4ec3a07c4e057610 (diff)
downloadcpython-754aab28ed5f94338641db8899f89f59895c2137.zip
cpython-754aab28ed5f94338641db8899f89f59895c2137.tar.gz
cpython-754aab28ed5f94338641db8899f89f59895c2137.tar.bz2
Issue #22854: Clarify documentation about UnsupportedOperation and add tests
Also change BufferedReader.writable() and BufferedWriter.readable() to always return False.
Diffstat (limited to 'Modules/_io/clinic/iobase.c.h')
-rw-r--r--Modules/_io/clinic/iobase.c.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/_io/clinic/iobase.c.h b/Modules/_io/clinic/iobase.c.h
index 3cea079..9762f11 100644
--- a/Modules/_io/clinic/iobase.c.h
+++ b/Modules/_io/clinic/iobase.c.h
@@ -66,7 +66,7 @@ PyDoc_STRVAR(_io__IOBase_seekable__doc__,
"\n"
"Return whether object supports random access.\n"
"\n"
-"If False, seek(), tell() and truncate() will raise UnsupportedOperation.\n"
+"If False, seek(), tell() and truncate() will raise OSError.\n"
"This method may need to do a test seek().");
#define _IO__IOBASE_SEEKABLE_METHODDEF \
@@ -87,7 +87,7 @@ PyDoc_STRVAR(_io__IOBase_readable__doc__,
"\n"
"Return whether object was opened for reading.\n"
"\n"
-"If False, read() will raise UnsupportedOperation.");
+"If False, read() will raise OSError.");
#define _IO__IOBASE_READABLE_METHODDEF \
{"readable", (PyCFunction)_io__IOBase_readable, METH_NOARGS, _io__IOBase_readable__doc__},
@@ -107,7 +107,7 @@ PyDoc_STRVAR(_io__IOBase_writable__doc__,
"\n"
"Return whether object was opened for writing.\n"
"\n"
-"If False, write() will raise UnsupportedOperation.");
+"If False, write() will raise OSError.");
#define _IO__IOBASE_WRITABLE_METHODDEF \
{"writable", (PyCFunction)_io__IOBase_writable, METH_NOARGS, _io__IOBase_writable__doc__},
@@ -127,7 +127,7 @@ PyDoc_STRVAR(_io__IOBase_fileno__doc__,
"\n"
"Returns underlying file descriptor if one exists.\n"
"\n"
-"An IOError is raised if the IO object does not use a file descriptor.");
+"OSError is raised if the IO object does not use a file descriptor.");
#define _IO__IOBASE_FILENO_METHODDEF \
{"fileno", (PyCFunction)_io__IOBase_fileno, METH_NOARGS, _io__IOBase_fileno__doc__},
@@ -276,4 +276,4 @@ _io__RawIOBase_readall(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return _io__RawIOBase_readall_impl(self);
}
-/*[clinic end generated code: output=fe034152b6884e65 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b874952f5cc248a4 input=a9049054013a1b77]*/