diff options
author | Raymond Hettinger <python@rcn.com> | 2002-05-16 04:28:44 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2002-05-16 04:28:44 (GMT) |
commit | cadc9fbd37496317e7e9f5138877ab8905a2deca (patch) | |
tree | 39ab4f32120f7fb9343e20c6159e62f688910f13 /Doc/lib | |
parent | 1e1fcef756dbec60c9062462b46777ffc2a0594e (diff) | |
download | cpython-cadc9fbd37496317e7e9f5138877ab8905a2deca.zip cpython-cadc9fbd37496317e7e9f5138877ab8905a2deca.tar.gz cpython-cadc9fbd37496317e7e9f5138877ab8905a2deca.tar.bz2 |
Patch 547037. Corrected documentation to match
actual module behavior for adding newlines.
Diffstat (limited to 'Doc/lib')
-rw-r--r-- | Doc/lib/libbase64.tex | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Doc/lib/libbase64.tex b/Doc/lib/libbase64.tex index 612da4c..91f4818 100644 --- a/Doc/lib/libbase64.tex +++ b/Doc/lib/libbase64.tex @@ -40,21 +40,19 @@ Encode the contents of the \var{input} file and write the resulting base64 encoded data to the \var{output} file. \var{input} and \var{output} must either be file objects or objects that mimic the file object interface. \var{input} will be read until -\code{\var{input}.read()} returns an empty string. If the last input -character is not a newline (\code{'\e n'}), a newline will be added to -the input data. +\code{\var{input}.read()} returns an empty string. \function{encode()} +returns the encoded data plus a trailing newline character +(\code{'\e n'}). \end{funcdesc} \begin{funcdesc}{encodestring}{s} Encode the string \var{s}, which can contain arbitrary binary data, and return a string containing one or more lines of -base64-encoded data. If the last character of \var{s} is not a -newline (\code{'\e n'}), a newline will be added. This causes -\code{encodestring('hello!')} to return the same value as -\code{encodestring('hello!\e n')}. +base64-encoded data. \function{encodestring()} returns a +string containing one or more lines of base64-encoded data +always including an extra trailing newline (\code{'\e n'}). \end{funcdesc} - \begin{seealso} \seemodule{binascii}{Support module containing \ASCII-to-binary and binary-to-\ASCII{} conversions.} |