summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Angrisano <michele.angrisano@gmail.com>2019-06-02 21:01:49 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2019-06-02 21:01:49 (GMT)
commitaca273e2401ca3151e15e984f400233b7f255e15 (patch)
treec7c71ce7031622dba71da3cd293464bc4436728d
parent3caf4de6f05f68c3a175f4d8ce870d7a0016622a (diff)
downloadcpython-aca273e2401ca3151e15e984f400233b7f255e15.zip
cpython-aca273e2401ca3151e15e984f400233b7f255e15.tar.gz
cpython-aca273e2401ca3151e15e984f400233b7f255e15.tar.bz2
bpo-37014: Update docstring and Documentation of fileinput.FileInput(). (GH-13545)
* bpo-37014: Update docstring and Documentation of fileinput.FileInput() * Explain the behavior of fileinput.FileInput() when reading stdin. * Update blurb. * bpo-37014: Fix typo in the docstring and documentation.
-rw-r--r--Doc/library/fileinput.rst5
-rw-r--r--Lib/fileinput.py6
-rw-r--r--Misc/ACKS1
3 files changed, 7 insertions, 5 deletions
diff --git a/Doc/library/fileinput.rst b/Doc/library/fileinput.rst
index 14be492..f5e5280 100644
--- a/Doc/library/fileinput.rst
+++ b/Doc/library/fileinput.rst
@@ -23,8 +23,9 @@ The typical use is::
This iterates over the lines of all files listed in ``sys.argv[1:]``, defaulting
to ``sys.stdin`` if the list is empty. If a filename is ``'-'``, it is also
-replaced by ``sys.stdin``. To specify an alternative list of filenames, pass it
-as the first argument to :func:`.input`. A single file name is also allowed.
+replaced by ``sys.stdin`` and the optional arguments *mode* and *openhook*
+are ignored. To specify an alternative list of filenames, pass it as the
+first argument to :func:`.input`. A single file name is also allowed.
All files are opened in text mode by default, but you can override this by
specifying the *mode* parameter in the call to :func:`.input` or
diff --git a/Lib/fileinput.py b/Lib/fileinput.py
index d868e74..c1b0ec9 100644
--- a/Lib/fileinput.py
+++ b/Lib/fileinput.py
@@ -8,9 +8,9 @@ Typical use is:
This iterates over the lines of all files listed in sys.argv[1:],
defaulting to sys.stdin if the list is empty. If a filename is '-' it
-is also replaced by sys.stdin. To specify an alternative list of
-filenames, pass it as the argument to input(). A single file name is
-also allowed.
+is also replaced by sys.stdin and the optional arguments mode and
+openhook are ignored. To specify an alternative list of filenames,
+pass it as the argument to input(). A single file name is also allowed.
Functions filename(), lineno() return the filename and cumulative line
number of the line that has just been read; filelineno() returns its
diff --git a/Misc/ACKS b/Misc/ACKS
index 5c23df8..082fa56 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -55,6 +55,7 @@ Juancarlo Añez
Chris Angelico
Jérémy Anger
Jon Anglin
+Michele Angrisano
Ankur Ankan
Heidi Annexstad
Ramchandra Apte