Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
494f2aea
Commit
494f2aea
authored
Sep 19, 2001
by
Marc-André Lemburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs and News item for the codecs.py additions.
parent
aa32c5aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
Doc/lib/libcodecs.tex
Doc/lib/libcodecs.tex
+32
-0
Misc/NEWS
Misc/NEWS
+4
-0
No files found.
Doc/lib/libcodecs.tex
View file @
494f2aea
...
...
@@ -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:
...
...
Misc/NEWS
View file @
494f2aea
...
...
@@ -34,6 +34,10 @@ Core
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)
simplifies writing XML RPC servers.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment