mirror of
https://github.com/python/cpython.git
synced 2025-11-11 14:44:57 +00:00
Docs and News item for the codecs.py additions.
This commit is contained in:
parent
aa32c5aa7c
commit
494f2aea8e
2 changed files with 36 additions and 0 deletions
|
|
@ -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.
|
tuple is stored in the cache and returned to the caller.
|
||||||
\end{funcdesc}
|
\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
|
To simplify working with encoded files or stream, the module
|
||||||
also defines these utility functions:
|
also defines these utility functions:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,10 @@ Core
|
||||||
|
|
||||||
Library
|
Library
|
||||||
|
|
||||||
|
- The codecs module has grown four new helper APIs to access
|
||||||
|
builtin codecs: getencoder(), getdecoder(), getreader(),
|
||||||
|
getwriter().
|
||||||
|
|
||||||
- SimpleXMLRPCServer: a new module (based upon SimpleHTMLServer)
|
- SimpleXMLRPCServer: a new module (based upon SimpleHTMLServer)
|
||||||
simplifies writing XML RPC servers.
|
simplifies writing XML RPC servers.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue