]> granicus.if.org Git - python/commitdiff
More docstring updates
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>
Mon, 6 Sep 2010 22:31:52 +0000 (22:31 +0000)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>
Mon, 6 Sep 2010 22:31:52 +0000 (22:31 +0000)
Lib/_pyio.py
Modules/_io/iobase.c

index 369bde9be83513f6024f833e498e3ef92315c0eb..d6dce6d781b3719c655337cd46aaead6f4ee4adb 100644 (file)
@@ -264,7 +264,8 @@ class IOBase(metaclass=abc.ABCMeta):
     Even though IOBase does not declare read, readinto, or write because
     their signatures will vary, implementations and clients should
     consider those methods part of the interface. Also, implementations
-    may raise a IOError when operations they do not support are called.
+    may raise UnsupportedOperation when operations they do not support are
+    called.
 
     The basic type used for binary data read from or written to a file is
     bytes. bytearrays are accepted too, and in some cases (such as
index 6521ae2bcc6ee35630b542b0ae2c9d27cb29e3fc..c74672df187a4aef5159b7286f2301b275e34273 100644 (file)
@@ -35,7 +35,8 @@ PyDoc_STRVAR(iobase_doc,
     "Even though IOBase does not declare read, readinto, or write because\n"
     "their signatures will vary, implementations and clients should\n"
     "consider those methods part of the interface. Also, implementations\n"
-    "may raise a IOError when operations they do not support are called.\n"
+    "may raise UnsupportedOperation when operations they do not support are\n"
+    "called.\n"
     "\n"
     "The basic type used for binary data read from or written to a file is\n"
     "bytes. bytearrays are accepted too, and in some cases (such as\n"
@@ -300,7 +301,7 @@ iobase_dealloc(iobase *self)
 PyDoc_STRVAR(iobase_seekable_doc,
     "Return whether object supports random access.\n"
     "\n"
-    "If False, seek(), tell() and truncate() will raise IOError.\n"
+    "If False, seek(), tell() and truncate() will raise UnsupportedOperation.\n"
     "This method may need to do a test seek().");
 
 static PyObject *
@@ -329,7 +330,7 @@ _PyIOBase_check_seekable(PyObject *self, PyObject *args)
 PyDoc_STRVAR(iobase_readable_doc,
     "Return whether object was opened for reading.\n"
     "\n"
-    "If False, read() will raise IOError.");
+    "If False, read() will raise UnsupportedOperation.");
 
 static PyObject *
 iobase_readable(PyObject *self, PyObject *args)
@@ -358,7 +359,7 @@ _PyIOBase_check_readable(PyObject *self, PyObject *args)
 PyDoc_STRVAR(iobase_writable_doc,
     "Return whether object was opened for writing.\n"
     "\n"
-    "If False, read() will raise IOError.");
+    "If False, write() will raise UnsupportedOperation.");
 
 static PyObject *
 iobase_writable(PyObject *self, PyObject *args)