[Python-checkins] r62344 - in python/branches/py3k: Doc/library/io.rst Lib/io.py

benjamin.peterson python-checkins at python.org
Mon Apr 14 23:30:21 CEST 2008


Author: benjamin.peterson
Date: Mon Apr 14 23:30:21 2008
New Revision: 62344

Log:
Fix problems in the io docs noted by Alexandre Vassalotti


Modified:
   python/branches/py3k/Doc/library/io.rst
   python/branches/py3k/Lib/io.py

Modified: python/branches/py3k/Doc/library/io.rst
==============================================================================
--- python/branches/py3k/Doc/library/io.rst	(original)
+++ python/branches/py3k/Doc/library/io.rst	Mon Apr 14 23:30:21 2008
@@ -437,12 +437,12 @@
 
    .. method:: read1()
 
-      In :class:`BytesIO`, this is the same as :meth:`read()`.
+      In :class:`BytesIO`, this is the same as :meth:`read`.
 
    .. method:: truncate([pos])
 
       Truncate the file to at most *pos* bytes.  *pos* defaults to the current
-      stream position, as returned by :meth:`tell()`.
+      stream position, as returned by :meth:`tell`.
 
 
 .. class:: BufferedReader(raw[, buffer_size])

Modified: python/branches/py3k/Lib/io.py
==============================================================================
--- python/branches/py3k/Lib/io.py	(original)
+++ python/branches/py3k/Lib/io.py	Mon Apr 14 23:30:21 2008
@@ -1,5 +1,4 @@
-"""
-The io module provides the Python interfaces to stream handling. The
+"""The io module provides the Python interfaces to stream handling. The
 builtin open function is defined in this module.
 
 At the top of the I/O hierarchy is the abstract base class IOBase. It
@@ -78,8 +77,7 @@
 
 def open(file, mode="r", buffering=None, encoding=None, errors=None,
          newline=None, closefd=True):
-    r"""
-    Open file and return a stream. If the file cannot be opened, an
+    r"""Open file and return a stream. If the file cannot be opened, an
     IOError is raised.
 
     file is either a string giving the name (and the path if the file
@@ -287,8 +285,7 @@
 
 class IOBase(metaclass=abc.ABCMeta):
 
-    """
-    The abstract base class for all I/O classes, acting on streams of
+    """The abstract base class for all I/O classes, acting on streams of
     bytes. There is no public constructor.
 
     This class provides dummy implementations for many methods that
@@ -793,7 +790,7 @@
         return bytes(b)
 
     def read1(self, n):
-        """In BytesIO, this is the same as read.
+        """This is the same as read.
         """
         return self.read(n)
 


More information about the Python-checkins mailing list