Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e9a0732

Browse files
committed
Note that passing a filename to uu.{en,de}code() is deprecated.
1 parent e76b7a8 commit e9a0732

2 files changed

Lines changed: 16 additions & 18 deletions

File tree

Doc/lib/libbinascii.tex

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ \section{Standard module \sectcode{binhex}}
1818
\end{funcdesc}
1919

2020
\begin{funcdesc}{hexbin}{input\optional{\, output}}
21-
Decode a binhex file \var{input}. \var{Input} may be a filename or a
21+
Decode a binhex file \var{input}. \var{input} may be a filename or a
2222
file-like object supporting \var{read} and \var{close} methods.
2323
The resulting file is written to a file named \var{output}, unless the
2424
argument is empty in which case the output filename is read from the
@@ -40,14 +40,13 @@ \section{Standard module \sectcode{uu}}
4040

4141
This module encodes and decodes files in uuencode format, allowing
4242
arbitrary binary data to be transferred over ascii-only connections.
43-
Whereever a file argument is expected, the methods accept either a
44-
pathname (\code{'-'} for stdin/stdout) or a file-like object.
45-
46-
Normally you would pass filenames, but there is one case where you
47-
have to open the file yourself: if you are on a non-unix platform and
48-
your binary file is actually a textfile that you want encoded
49-
unix-compatible you will have to open the file yourself as a textfile,
50-
so newline conversion is performed.
43+
Wherever a file argument is expected, the methods accept a file-like
44+
object. For backwards compatibility, a string containing a pathname
45+
is also accepted, and the corresponding file will be opened for
46+
reading and writing; the pathname \code{'-'} is understood to mean the
47+
standard input or output. However, this interface is deprecated; it's
48+
better for the caller to open the file itself, and be sure that, when
49+
required, the mode is \code{'rb'} or \code{'wb'} on Windows or DOS.
5150

5251
This code was contributed by Lance Ellinghouse, and modified by Jack
5352
Jansen.

Doc/libbinascii.tex

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ \section{Standard module \sectcode{binhex}}
1818
\end{funcdesc}
1919

2020
\begin{funcdesc}{hexbin}{input\optional{\, output}}
21-
Decode a binhex file \var{input}. \var{Input} may be a filename or a
21+
Decode a binhex file \var{input}. \var{input} may be a filename or a
2222
file-like object supporting \var{read} and \var{close} methods.
2323
The resulting file is written to a file named \var{output}, unless the
2424
argument is empty in which case the output filename is read from the
@@ -40,14 +40,13 @@ \section{Standard module \sectcode{uu}}
4040

4141
This module encodes and decodes files in uuencode format, allowing
4242
arbitrary binary data to be transferred over ascii-only connections.
43-
Whereever a file argument is expected, the methods accept either a
44-
pathname (\code{'-'} for stdin/stdout) or a file-like object.
45-
46-
Normally you would pass filenames, but there is one case where you
47-
have to open the file yourself: if you are on a non-unix platform and
48-
your binary file is actually a textfile that you want encoded
49-
unix-compatible you will have to open the file yourself as a textfile,
50-
so newline conversion is performed.
43+
Wherever a file argument is expected, the methods accept a file-like
44+
object. For backwards compatibility, a string containing a pathname
45+
is also accepted, and the corresponding file will be opened for
46+
reading and writing; the pathname \code{'-'} is understood to mean the
47+
standard input or output. However, this interface is deprecated; it's
48+
better for the caller to open the file itself, and be sure that, when
49+
required, the mode is \code{'rb'} or \code{'wb'} on Windows or DOS.
5150

5251
This code was contributed by Lance Ellinghouse, and modified by Jack
5352
Jansen.

0 commit comments

Comments
 (0)