diff options
author | Walter Dörwald <walter@livinglogic.de> | 2007-07-19 13:04:38 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2007-07-19 13:04:38 (GMT) |
commit | 219336af8288c9b472a37090b9ae46ec18bdcae5 (patch) | |
tree | 4dd381c9d762a7c27a75b4fe46ab29c84b57de34 /Modules/_codecsmodule.c | |
parent | b68c944c3caab94b0b8c90b9477599310f9b7fb7 (diff) | |
download | cpython-219336af8288c9b472a37090b9ae46ec18bdcae5.zip cpython-219336af8288c9b472a37090b9ae46ec18bdcae5.tar.gz cpython-219336af8288c9b472a37090b9ae46ec18bdcae5.tar.bz2 |
Document that codecs.lookup() returns a CodecInfo object.
(fixes SF bug #1754453).
Diffstat (limited to 'Modules/_codecsmodule.c')
-rw-r--r-- | Modules/_codecsmodule.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Modules/_codecsmodule.c b/Modules/_codecsmodule.c index 4dbceb7..655277c 100644 --- a/Modules/_codecsmodule.c +++ b/Modules/_codecsmodule.c @@ -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 functions."); +a tuple of function (or a CodecInfo object)."); static PyObject *codec_lookup(PyObject *self, PyObject *args) |