Skip to content

Commit

Permalink
More docstring fixes, and an XXX.
Browse files Browse the repository at this point in the history
  • Loading branch information
birkenfeld committed Apr 9, 2008
1 parent 67b8cad commit f91197c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Lib/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ def tell(self) -> int:
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")
Expand Down Expand Up @@ -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:
Expand All @@ -478,7 +478,7 @@ def read(self, n: int = -1) -> bytes:
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)
Expand Down Expand Up @@ -521,6 +521,7 @@ def close(self):
def name(self):
return self._name

# XXX(gb): _FileIO already has a mode property
@property
def mode(self):
return self._mode
Expand Down

0 comments on commit f91197c

Please sign in to comment.