summaryrefslogtreecommitdiffstats
path: root/Lib/fileinput.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2013-06-28 22:59:52 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2013-06-28 22:59:52 (GMT)
commitb1c68274cee4e4262f5e5a2fb2786554df138862 (patch)
tree1690ee2edac5231046178707b154c046c261c265 /Lib/fileinput.py
parent3fe70b4acc0738041f4617ce76f902e213a51139 (diff)
parent70d2c711f10b385a4bc04b1b827883e12acc0509 (diff)
downloadcpython-b1c68274cee4e4262f5e5a2fb2786554df138862.zip
cpython-b1c68274cee4e4262f5e5a2fb2786554df138862.tar.gz
cpython-b1c68274cee4e4262f5e5a2fb2786554df138862.tar.bz2
Merge with 3.3
Diffstat (limited to 'Lib/fileinput.py')
-rw-r--r--Lib/fileinput.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/Lib/fileinput.py b/Lib/fileinput.py
index f9bb88a..3215154 100644
--- a/Lib/fileinput.py
+++ b/Lib/fileinput.py
@@ -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(),