]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #18315: Improve fileinput docs by adding 'bufsize' where missing and
authorTerry Jan Reedy <tjreedy@udel.edu>
Fri, 28 Jun 2013 22:59:19 +0000 (18:59 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Fri, 28 Jun 2013 22:59:19 +0000 (18:59 -0400)
replacing redundant signature in input() docstring with one-line summary.
Original patch by Terrel Shumway.

Doc/library/fileinput.rst
Lib/fileinput.py
Misc/ACKS

index 172a643ac50aa7bdf998382d37baea5d09f2f9c1..ce892ce277c633fa07d4aa9bc39efba6f22e3071 100644 (file)
@@ -50,7 +50,7 @@ provided by this module.
 The following function is the primary interface of this module:
 
 
-.. function:: input([files[, inplace[, backup[, mode[, openhook]]]]])
+.. function:: input([files[, inplace[, backup[, bufsize[, mode[, openhook]]]]]])
 
    Create an instance of the :class:`FileInput` class.  The instance will be used
    as global state for the functions of this module, and is also returned to use
@@ -122,7 +122,7 @@ The class which implements the sequence behavior provided by the module is
 available for subclassing as well:
 
 
-.. class:: FileInput([files[, inplace[, backup[, mode[, openhook]]]]])
+.. class:: FileInput([files[, inplace[, backup[,bufsize[, mode[, openhook]]]]]])
 
    Class :class:`FileInput` is the implementation; its methods :meth:`filename`,
    :meth:`fileno`, :meth:`lineno`, :meth:`filelineno`, :meth:`isfirstline`,
index ba48575209295f1e3da4b34bf975211474b2efbc..04e97bdb418e83dc9d12fc51ebc3a8dd77a131fc 100644 (file)
@@ -90,12 +90,11 @@ DEFAULT_BUFSIZE = 8*1024
 
 def input(files=None, inplace=0, backup="", bufsize=0,
           mode="r", openhook=None):
-    """input([files[, inplace[, backup[, mode[, openhook]]]]])
+    """Return an instance of the FileInput class, which can be iterated.
 
-    Create an instance of the FileInput class. The instance will be used
-    as global state for the functions of this module, and is also returned
-    to use during iteration. The parameters to this function will be passed
-    along to the constructor of the FileInput class.
+    The parameters are passed to the constructor of the FileInput class.
+    The returned instance, in addition to being an iterator,
+    keeps global state for the functions of this module,.
     """
     global _state
     if _state and _state._file:
@@ -182,7 +181,7 @@ def isstdin():
     return _state.isstdin()
 
 class FileInput:
-    """class FileInput([files[, inplace[, backup[, mode[, openhook]]]]])
+    """FileInput([files[, inplace[, backup[, bufsize[, mode[, openhook]]]]]])
 
     Class FileInput is the implementation of the module; its methods
     filename(), lineno(), fileline(), isfirstline(), isstdin(), fileno(),
index fc0d9d216be74735704745d101491bba29ddb2ed..f8e588e1dd71cef3176209dfece3a7fdff13ff7c 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -937,6 +937,7 @@ John W. Shipman
 Joel Shprentz
 Itamar Shtull-Trauring
 Yue Shuaijie
+Terrel Shumway
 Eric Siegerman
 Paul Sijben
 Tim Silk