[Python-checkins] r56456 - python/trunk/Modules/_codecsmodule.c
walter.doerwald
python-checkins at python.org
Thu Jul 19 15:04:38 CEST 2007
Author: walter.doerwald
Date: Thu Jul 19 15:04:38 2007
New Revision: 56456
Modified:
python/trunk/Modules/_codecsmodule.c
Log:
Document that codecs.lookup() returns a CodecInfo object.
(fixes SF bug #1754453).
Modified: python/trunk/Modules/_codecsmodule.c
==============================================================================
--- python/trunk/Modules/_codecsmodule.c (original)
+++ python/trunk/Modules/_codecsmodule.c Thu Jul 19 15:04:38 2007
@@ -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 @@
\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 @@
}
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 functions.");
+a tuple of function (or a CodecInfo object).");
static
PyObject *codec_lookup(PyObject *self, PyObject *args)
More information about the Python-checkins
mailing list