Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ada99488
Commit
ada99488
authored
Sep 06, 2010
by
Amaury Forgeot d'Arc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change docstrings to match the implementation
parent
c31be630
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Lib/_pyio.py
Lib/_pyio.py
+6
-6
No files found.
Lib/_pyio.py
View file @
ada99488
...
@@ -358,13 +358,13 @@ class IOBase(metaclass=abc.ABCMeta):
...
@@ -358,13 +358,13 @@ class IOBase(metaclass=abc.ABCMeta):
def
seekable
(
self
)
->
bool
:
def
seekable
(
self
)
->
bool
:
"""Return whether object supports random access.
"""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().
This method may need to do a test seek().
"""
"""
return
False
return
False
def
_checkSeekable
(
self
,
msg
=
None
):
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
():
if
not
self
.
seekable
():
raise
UnsupportedOperation
(
"File or stream is not seekable."
raise
UnsupportedOperation
(
"File or stream is not seekable."
...
@@ -373,12 +373,12 @@ class IOBase(metaclass=abc.ABCMeta):
...
@@ -373,12 +373,12 @@ class IOBase(metaclass=abc.ABCMeta):
def
readable
(
self
)
->
bool
:
def
readable
(
self
)
->
bool
:
"""Return whether object was opened for reading.
"""Return whether object was opened for reading.
If False, read() will raise
IOError
.
If False, read() will raise
UnsupportedOperation
.
"""
"""
return
False
return
False
def
_checkReadable
(
self
,
msg
=
None
):
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
():
if
not
self
.
readable
():
raise
UnsupportedOperation
(
"File or stream is not readable."
raise
UnsupportedOperation
(
"File or stream is not readable."
...
@@ -387,12 +387,12 @@ class IOBase(metaclass=abc.ABCMeta):
...
@@ -387,12 +387,12 @@ class IOBase(metaclass=abc.ABCMeta):
def
writable
(
self
)
->
bool
:
def
writable
(
self
)
->
bool
:
"""Return whether object was opened for writing.
"""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
return
False
def
_checkWritable
(
self
,
msg
=
None
):
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
():
if
not
self
.
writable
():
raise
UnsupportedOperation
(
"File or stream is not writable."
raise
UnsupportedOperation
(
"File or stream is not writable."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment