[issue10435] Document unicode C-API in reST

Alexander Belopolsky report at bugs.python.org
Wed Nov 17 01:25:13 CET 2010

Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

On Tue, Nov 16, 2010 at 7:19 PM, Marc-Andre Lemburg
<report at bugs.python.org> wrote:
>> * Decoding converts a bytes object encoded using a particular
>> character set encoding to a string object.
>> """ http://docs.python.org/dev/library/codecs.html?highlight=codecs#codecs.Codec.encode
> That's another documentation bug, then. The codec system has always
> supported other type combinations for encoding/decoding as well.
> Only certain methods on str and bytes objects in 3.x limit the possible
> types to either str or bytes - which probably results in the
> idea that Python codecs don't support anything else.
> The text from the 2.7 documentation is correct, also for 3.x:
> http://docs.python.org/library/codecs.html#codec-objects

I agree and will handle this in #10435 because codecs.h
(unsurprisingly) supports your POV and we don't want C-API docs to be
in conflict with Py-API docs.

If you have time, please take a look at
PyUnicode_As{En,De}codedObject() and
PyUnicode_As{En,De}DecodedUnicode() documentation in the attached


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list