diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-06-02 14:36:34 -0700 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2019-06-02 23:36:34 +0200 |
commit | 6bd438e137a0618b8db949a4751304f541b6674d (patch) | |
tree | 3e2557575f9a70714c34dde9efe2adcc8937f1a1 /Doc | |
parent | b4e0bfd4778e142f037f50c19c4bb5bd123b4641 (diff) | |
download | cpython-git-6bd438e137a0618b8db949a4751304f541b6674d.tar.gz |
bpo-37014: Update docstring and Documentation of fileinput.FileInput(). (GH-13545) (GH-13753)
* 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>
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/fileinput.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/fileinput.rst b/Doc/library/fileinput.rst index 1fc11ffce2..bf81749f94 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 |