summaryrefslogtreecommitdiffstats
path: root/Lib/io.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-04-09 07:33:01 (GMT)
committerGeorg Brandl <georg@python.org>2008-04-09 07:33:01 (GMT)
commitf91197c6d51e5518372df281026a7ab897f6a5d1 (patch)
tree36b8abe9341728a24e13fc18aa4f424468b3e08f /Lib/io.py
parent67b8cad16a2497c627aaa515851d3f9d637a5aec (diff)
downloadcpython-f91197c6d51e5518372df281026a7ab897f6a5d1.zip
cpython-f91197c6d51e5518372df281026a7ab897f6a5d1.tar.gz
cpython-f91197c6d51e5518372df281026a7ab897f6a5d1.tar.bz2
More docstring fixes, and an XXX.
Diffstat (limited to 'Lib/io.py')
-rw-r--r--Lib/io.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/io.py b/Lib/io.py
index 15eca0a..87d5d5f 100644
--- a/Lib/io.py
+++ b/Lib/io.py
@@ -257,9 +257,9 @@ class IOBase(metaclass=abc.ABCMeta):
return self.seek(0, 1)
def truncate(self, pos: int = None) -> int:
- """truncate(size: int = None) -> int. Truncate file to size bytes.
+ """truncate(pos: int = None) -> int. Truncate file to pos bytes.
- Size defaults to the current IO position as reported by tell().
+ Pos defaults to the current IO position as reported by tell().
Returns the new size.
"""
self._unsupported("truncate")
@@ -465,7 +465,7 @@ class RawIOBase(IOBase):
def read(self, n: int = -1) -> bytes:
"""read(n: int) -> bytes. Read and return up to n bytes.
- Returns an empty bytes array on EOF, or None if the object is
+ Returns an empty bytes object on EOF, or None if the object is
set not to block and has no data to read.
"""
if n is None:
@@ -478,7 +478,7 @@ class RawIOBase(IOBase):
return bytes(b)
def readall(self):
- """readall() -> bytes. Read until EOF, using multiple read() call."""
+ """readall() -> bytes. Read until EOF, using multiple read() calls."""
res = bytearray()
while True:
data = self.read(DEFAULT_BUFFER_SIZE)
@@ -521,6 +521,7 @@ class FileIO(_fileio._FileIO, RawIOBase):
def name(self):
return self._name
+ # XXX(gb): _FileIO already has a mode property
@property
def mode(self):
return self._mode