Skip to content

Commit

Permalink
Issue #18315: Improve fileinput docs by adding 'bufsize' where missin…
Browse files Browse the repository at this point in the history
…g and

replacing redundant signature in input() docstring with one-line summary.
Original patch by Terrel Shumway.
  • Loading branch information
terryjreedy committed Jun 28, 2013
1 parent 02e4a7b commit 70d2c71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Lib/fileinput.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,11 @@

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:
Expand Down Expand Up @@ -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(),
Expand Down
1 change: 1 addition & 0 deletions Misc/ACKS
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,7 @@ John W. Shipman
Joel Shprentz
Itamar Shtull-Trauring
Yue Shuaijie
Terrel Shumway
Eric Siegerman
Paul Sijben
SilentGhost
Expand Down

0 comments on commit 70d2c71

Please sign in to comment.