File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ \section{\module{fileinput} ---
7676 Return the integer `` file descriptor'' for the current file. When no
7777 file is opened (before the first line and between files), returns
7878 \code {-1}.
79+ \versionadded {2.5}
7980\end {funcdesc }
8081
8182\begin {funcdesc }{lineno}{}
@@ -167,7 +168,9 @@ \section{\module{fileinput} ---
167168\begin {funcdesc }{hook_compressed}{filename, mode}
168169 Transparently opens files compressed with gzip and bzip2 (recognized
169170 by the extensions \code {'.gz'} and \code {'.bz2'}) using the \module {gzip}
170- and \module {bz2} modules as well as normal files.
171+ and \module {bz2} modules. If the filename extension is not \code {'.gz'}
172+ or \code {'.bz2'}, the file is openned normally (ie,
173+ using \function {open()} without any decompression).
171174
172175 Usage example:
173176 \samp {fi = fileinput.FileInput(openhook=fileinput.hook_compressed)}
You can’t perform that action at this time.
0 commit comments