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
219336af
Commit
219336af
authored
Jul 19, 2007
by
Walter Dörwald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document that codecs.lookup() returns a CodecInfo object.
(fixes SF bug #1754453).
parent
b68c944c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
Modules/_codecsmodule.c
Modules/_codecsmodule.c
+5
-4
No files found.
Modules/_codecsmodule.c
View file @
219336af
...
...
@@ -10,7 +10,7 @@
register(search_function) -> None
lookup(encoding) ->
(encoder, decoder, stream_reader, stream_writer)
lookup(encoding) ->
CodecInfo object
The builtin Unicode codecs use the following interface:
...
...
@@ -45,7 +45,8 @@ PyDoc_STRVAR(register__doc__,
\n
\
Register a codec search function. Search functions are expected to take
\n
\
one argument, the encoding name in all lower case letters, and return
\n
\
a tuple of functions (encoder, decoder, stream_reader, stream_writer)."
);
a tuple of functions (encoder, decoder, stream_reader, stream_writer)
\n
\
(or a CodecInfo object)."
);
static
PyObject
*
codec_register
(
PyObject
*
self
,
PyObject
*
search_function
)
...
...
@@ -57,10 +58,10 @@ PyObject *codec_register(PyObject *self, PyObject *search_function)
}
PyDoc_STRVAR
(
lookup__doc__
,
"lookup(encoding) ->
(encoder, decoder, stream_reader, stream_writer)
\n
\
"lookup(encoding) ->
CodecInfo
\n
\
\n
\
Looks up a codec tuple in the Python codec registry and returns
\n
\
a tuple of function
s
."
);
a tuple of function
(or a CodecInfo object)
."
);
static
PyObject
*
codec_lookup
(
PyObject
*
self
,
PyObject
*
args
)
...
...
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