]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-37014: Update docstring and Documentation of fileinput.FileInput(). (GH-13545...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 2 Jun 2019 21:36:34 +0000 (14:36 -0700)
committerEzio Melotti <ezio.melotti@gmail.com>
Sun, 2 Jun 2019 21:36:34 +0000 (23:36 +0200)
* 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.
(cherry picked from commit aca273e2401ca3151e15e984f400233b7f255e15)

Co-authored-by: Michele Angrisano <michele.angrisano@gmail.com>
Doc/library/fileinput.rst
Lib/fileinput.py
Misc/ACKS

index 1fc11ffce25e051823d7907464c53718178a5871..bf81749f94562c82a366b3559c2293dcd96741f6 100644 (file)
@@ -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
index c6fc9a1981a1fa058b0c9f91f3f58f9cd9d5d6c5..c8b8b23674c979372cd00621ec24bf9bf244c710 100644 (file)
@@ -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
index 40e7990886454dbebf85c9f17f840621798546aa..f7fc70afd173a79b78f724b6cf6d7cd051c63b40 100644 (file)
--- 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