Patch #1212287: fileinput.input() now has a mode parameter for
specifying the file mode input files should be opened with.
diff --git a/Doc/lib/libfileinput.tex b/Doc/lib/libfileinput.tex
index b6186dc..9e16f44 100644
--- a/Doc/lib/libfileinput.tex
+++ b/Doc/lib/libfileinput.tex
@@ -26,8 +26,10 @@
 it as the first argument to \function{input()}.  A single file name is
 also allowed.
 
-All files are opened in text mode.  If an I/O error occurs during
-opening or reading a file, \exception{IOError} is raised.
+All files are opened in text mode by default, but you can override this by
+specifying the \var{mode} parameter in the call to \function{input()}
+or \class{FileInput()}.  If an I/O error occurs during opening or reading
+a file, \exception{IOError} is raised.
 
 If \code{sys.stdin} is used more than once, the second and further use
 will return no lines, except perhaps for interactive use, or if it has
@@ -44,12 +46,14 @@
 The following function is the primary interface of this module:
 
 \begin{funcdesc}{input}{\optional{files\optional{,
-                       inplace\optional{, backup}}}}
+                       inplace\optional{, backup\optional{, mode}}}}}
   Create an instance of the \class{FileInput} class.  The instance
   will be used as global state for the functions of this module, and
   is also returned to use during iteration.  The parameters to this
   function will be passed along to the constructor of the
   \class{FileInput} class.
+
+  \versionchanged[Added the \var{mode} parameter]{2.5}
 \end{funcdesc}
 
 
@@ -111,7 +115,7 @@
 module is available for subclassing as well:
 
 \begin{classdesc}{FileInput}{\optional{files\optional{,
-                             inplace\optional{, backup}}}}
+                             inplace\optional{, backup\optional{, mode}}}}}
   Class \class{FileInput} is the implementation; its methods
   \method{filename()}, \method{fileno()}, \method{lineno()},
   \method{fileline()}, \method{isfirstline()}, \method{isstdin()},
@@ -122,6 +126,12 @@
   which implements the sequence behavior.  The sequence must be
   accessed in strictly sequential order; random access and
   \method{readline()} cannot be mixed.
+
+  With \var{mode} you can specify which file mode will be passed to
+  \function{open()}. It must be one of \code{'r'}, \code{'rU'},
+  \code{'U'} and \code{'rb'}.
+
+  \versionchanged[Added the \var{mode} parameter]{2.5}
 \end{classdesc}
 
 \strong{Optional in-place filtering:} if the keyword argument