summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libcodecs.tex
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2002-04-16 15:12:10 (GMT)
committerSkip Montanaro <skip@pobox.com>2002-04-16 15:12:10 (GMT)
commit6c7bc310895baffbb7d5475305012f5b0b8708fd (patch)
tree6d0cc61c04d99db1979c41faedc1e0ed738e5075 /Doc/lib/libcodecs.tex
parent0e661dcdbf35e5ff5589d401189a4459dd2341ea (diff)
downloadcpython-6c7bc310895baffbb7d5475305012f5b0b8708fd.zip
cpython-6c7bc310895baffbb7d5475305012f5b0b8708fd.tar.gz
cpython-6c7bc310895baffbb7d5475305012f5b0b8708fd.tar.bz2
added small clarification to the descriptions of encode() and decode()
Diffstat (limited to 'Doc/lib/libcodecs.tex')
-rw-r--r--Doc/lib/libcodecs.tex8
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/lib/libcodecs.tex b/Doc/lib/libcodecs.tex
index 396b4b3..efb710d 100644
--- a/Doc/lib/libcodecs.tex
+++ b/Doc/lib/libcodecs.tex
@@ -201,7 +201,10 @@ function interfaces of the stateless encoder and decoder:
\begin{methoddesc}{encode}{input\optional{, errors}}
Encodes the object \var{input} and returns a tuple (output object,
- length consumed).
+ length consumed). While codecs are not restricted to use with Unicode, in
+ a Unicode context, encoding converts a Unicode object to a plain string
+ using a particular character set encoding (e.g., \code{cp1252} or
+ \code{iso-8859-1}).
\var{errors} defines the error handling to apply. It defaults to
\code{'strict'} handling.
@@ -216,7 +219,8 @@ function interfaces of the stateless encoder and decoder:
\begin{methoddesc}{decode}{input\optional{, errors}}
Decodes the object \var{input} and returns a tuple (output object,
- length consumed).
+ length consumed). In a Unicode context, decoding converts a plain string
+ encoded using a particular character set encoding to a Unicode object.
\var{input} must be an object which provides the \code{bf_getreadbuf}
buffer slot. Python strings, buffer objects and memory mapped files