summaryrefslogtreecommitdiffstats
path: root/Lib/_pyio.py
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2010-09-06 22:23:13 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2010-09-06 22:23:13 (GMT)
commitada99488d93e268a0d138a3ad55003502f89903c (patch)
treef90d932feaa46fc7f1bff5c6d6a98e701a4a457f /Lib/_pyio.py
parentc31be6307f95eb95f9659b95ace7362ad6164b20 (diff)
downloadcpython-ada99488d93e268a0d138a3ad55003502f89903c.zip
cpython-ada99488d93e268a0d138a3ad55003502f89903c.tar.gz
cpython-ada99488d93e268a0d138a3ad55003502f89903c.tar.bz2
Change docstrings to match the implementation
Diffstat (limited to 'Lib/_pyio.py')
-rw-r--r--Lib/_pyio.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/_pyio.py b/Lib/_pyio.py
index 6b25640..369bde9 100644
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -358,13 +358,13 @@ class IOBase(metaclass=abc.ABCMeta):
def seekable(self) -> bool:
"""Return whether object supports random access.
- If False, seek(), tell() and truncate() will raise IOError.
+ If False, seek(), tell() and truncate() will raise UnsupportedOperation.
This method may need to do a test seek().
"""
return False
def _checkSeekable(self, msg=None):
- """Internal: raise an IOError if file is not seekable
+ """Internal: raise UnsupportedOperation if file is not seekable
"""
if not self.seekable():
raise UnsupportedOperation("File or stream is not seekable."
@@ -373,12 +373,12 @@ class IOBase(metaclass=abc.ABCMeta):
def readable(self) -> bool:
"""Return whether object was opened for reading.
- If False, read() will raise IOError.
+ If False, read() will raise UnsupportedOperation.
"""
return False
def _checkReadable(self, msg=None):
- """Internal: raise an IOError if file is not readable
+ """Internal: raise UnsupportedOperation if file is not readable
"""
if not self.readable():
raise UnsupportedOperation("File or stream is not readable."
@@ -387,12 +387,12 @@ class IOBase(metaclass=abc.ABCMeta):
def writable(self) -> bool:
"""Return whether object was opened for writing.
- If False, write() and truncate() will raise IOError.
+ If False, write() and truncate() will raise UnsupportedOperation.
"""
return False
def _checkWritable(self, msg=None):
- """Internal: raise an IOError if file is not writable
+ """Internal: raise UnsupportedOperation if file is not writable
"""
if not self.writable():
raise UnsupportedOperation("File or stream is not writable."