summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2001-09-19 11:33:31 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2001-09-19 11:33:31 (GMT)
commit494f2aea8e56a73012f7aeb31ecdd14b13c6da59 (patch)
tree89d9e607d0423fd9503bac07a883fccc1518b56e /Doc
parentaa32c5aa7ca9ce842628d90c2d0fb4406ab5ff82 (diff)
downloadcpython-494f2aea8e56a73012f7aeb31ecdd14b13c6da59.zip
cpython-494f2aea8e56a73012f7aeb31ecdd14b13c6da59.tar.gz
cpython-494f2aea8e56a73012f7aeb31ecdd14b13c6da59.tar.bz2
Docs and News item for the codecs.py additions.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libcodecs.tex32
1 files changed, 32 insertions, 0 deletions
diff --git a/Doc/lib/libcodecs.tex b/Doc/lib/libcodecs.tex
index acbed9a..844f6ec 100644
--- a/Doc/lib/libcodecs.tex
+++ b/Doc/lib/libcodecs.tex
@@ -63,6 +63,38 @@ is found, a \exception{LookupError} is raised. Otherwise, the codecs
tuple is stored in the cache and returned to the caller.
\end{funcdesc}
+To simply access to the various codecs, the module provides these
+additional functions which use \function{lookup()} for the codec
+lookup:
+
+\begin{funcdesc}{getencoder}{encoding}
+Lookup up the codec for the given encoding and return its encoder
+function.
+
+Raises a \exception{LookupError} in case the encoding cannot be found.
+\end{funcdesc}
+
+\begin{funcdesc}{getdecoder}{encoding}
+Lookup up the codec for the given encoding and return its decoder
+function.
+
+Raises a \exception{LookupError} in case the encoding cannot be found.
+\end{funcdesc}
+
+\begin{funcdesc}{getreader}{encoding}
+Lookup up the codec for the given encoding and return its StreamReader
+class or factory function.
+
+Raises a \exception{LookupError} in case the encoding cannot be found.
+\end{funcdesc}
+
+\begin{funcdesc}{getwriter}{encoding}
+Lookup up the codec for the given encoding and return its StreamWriter
+class or factory function.
+
+Raises a \exception{LookupError} in case the encoding cannot be found.
+\end{funcdesc}
+
To simplify working with encoded files or stream, the module
also defines these utility functions: