Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ada9948

Browse files
committed
Change docstrings to match the implementation
1 parent c31be63 commit ada9948

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Lib/_pyio.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -358,13 +358,13 @@ def __del__(self) -> None:
358358
def seekable(self) -> bool:
359359
"""Return whether object supports random access.
360360
361-
If False, seek(), tell() and truncate() will raise IOError.
361+
If False, seek(), tell() and truncate() will raise UnsupportedOperation.
362362
This method may need to do a test seek().
363363
"""
364364
return False
365365

366366
def _checkSeekable(self, msg=None):
367-
"""Internal: raise an IOError if file is not seekable
367+
"""Internal: raise UnsupportedOperation if file is not seekable
368368
"""
369369
if not self.seekable():
370370
raise UnsupportedOperation("File or stream is not seekable."
@@ -373,12 +373,12 @@ def _checkSeekable(self, msg=None):
373373
def readable(self) -> bool:
374374
"""Return whether object was opened for reading.
375375
376-
If False, read() will raise IOError.
376+
If False, read() will raise UnsupportedOperation.
377377
"""
378378
return False
379379

380380
def _checkReadable(self, msg=None):
381-
"""Internal: raise an IOError if file is not readable
381+
"""Internal: raise UnsupportedOperation if file is not readable
382382
"""
383383
if not self.readable():
384384
raise UnsupportedOperation("File or stream is not readable."
@@ -387,12 +387,12 @@ def _checkReadable(self, msg=None):
387387
def writable(self) -> bool:
388388
"""Return whether object was opened for writing.
389389
390-
If False, write() and truncate() will raise IOError.
390+
If False, write() and truncate() will raise UnsupportedOperation.
391391
"""
392392
return False
393393

394394
def _checkWritable(self, msg=None):
395-
"""Internal: raise an IOError if file is not writable
395+
"""Internal: raise UnsupportedOperation if file is not writable
396396
"""
397397
if not self.writable():
398398
raise UnsupportedOperation("File or stream is not writable."

0 commit comments

Comments
 (0)