Commit 87f28752 authored by Neal Norwitz's avatar Neal Norwitz

Minor tweaks

parent 0090a4c1
...@@ -76,6 +76,7 @@ The following functions use the global state created by ...@@ -76,6 +76,7 @@ The following functions use the global state created by
Return the integer ``file descriptor'' for the current file. When no Return the integer ``file descriptor'' for the current file. When no
file is opened (before the first line and between files), returns file is opened (before the first line and between files), returns
\code{-1}. \code{-1}.
\versionadded{2.5}
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{lineno}{} \begin{funcdesc}{lineno}{}
...@@ -167,7 +168,9 @@ The two following opening hooks are provided by this module: ...@@ -167,7 +168,9 @@ The two following opening hooks are provided by this module:
\begin{funcdesc}{hook_compressed}{filename, mode} \begin{funcdesc}{hook_compressed}{filename, mode}
Transparently opens files compressed with gzip and bzip2 (recognized Transparently opens files compressed with gzip and bzip2 (recognized
by the extensions \code{'.gz'} and \code{'.bz2'}) using the \module{gzip} by the extensions \code{'.gz'} and \code{'.bz2'}) using the \module{gzip}
and \module{bz2} modules as well as normal files. and \module{bz2} modules. If the filename extension is not \code{'.gz'}
or \code{'.bz2'}, the file is openned normally (ie,
using \function{open()} without any decompression).
Usage example: Usage example:
\samp{fi = fileinput.FileInput(openhook=fileinput.hook_compressed)} \samp{fi = fileinput.FileInput(openhook=fileinput.hook_compressed)}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment