diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2013-06-28 22:59:19 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2013-06-28 22:59:19 (GMT) |
commit | 35115e6aabda3284bf6ac1c4278ddbff70c62ccf (patch) | |
tree | 3ebc970bd12ea0cca9c0db976d72c7deb8883f53 /Lib/fileinput.py | |
parent | 73d6aca5d2b0e08749eea1b9684d22c53b04e292 (diff) | |
download | cpython-35115e6aabda3284bf6ac1c4278ddbff70c62ccf.zip cpython-35115e6aabda3284bf6ac1c4278ddbff70c62ccf.tar.gz cpython-35115e6aabda3284bf6ac1c4278ddbff70c62ccf.tar.bz2 |
Issue #18315: Improve fileinput docs by adding 'bufsize' where missing and
replacing redundant signature in input() docstring with one-line summary.
Original patch by Terrel Shumway.
Diffstat (limited to 'Lib/fileinput.py')
-rw-r--r-- | Lib/fileinput.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Lib/fileinput.py b/Lib/fileinput.py index ba48575..04e97bd 100644 --- a/Lib/fileinput.py +++ b/Lib/fileinput.py @@ -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(), |