]> 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:28 +0000 (18:59 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Fri, 28 Jun 2013 22:59:28 +0000 (18:59 -0400)
replacing redundant signature in input() docstring with one-line summary.
Original patch by Terrel Shumway.

Lib/fileinput.py
Misc/ACKS

index dbbbb2192ea62a4704b288b07c8052950c4b4bd1..879a0fdaab6225b1c6b6098011be082185c0a2bc 100644 (file)
@@ -90,13 +90,11 @@ DEFAULT_BUFSIZE = 8*1024
 
 def input(files=None, inplace=False, backup="", bufsize=0,
           mode="r", openhook=None):
-    """input(files=None, inplace=False, backup="", bufsize=0, \
-mode="r", openhook=None)
+    """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:
@@ -183,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 f3e427a7dd1a1a42fedce381c80b4fbf05b03a67..4e0fcbe2565e4dceebab2c7a76edf898a259b56b 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1125,6 +1125,7 @@ John W. Shipman
 Joel Shprentz
 Itamar Shtull-Trauring
 Yue Shuaijie
+Terrel Shumway
 Eric Siegerman
 Paul Sijben
 SilentGhost