Message121331
On Tue, Nov 16, 2010 at 7:19 PM, Marc-Andre Lemburg
<report@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
patch. |
|
Date |
User |
Action |
Args |
2010-11-17 00:25:13 | belopolsky | set | recipients:
+ belopolsky, lemburg, loewis, vstinner |
2010-11-17 00:25:11 | belopolsky | link | issue10435 messages |
2010-11-17 00:25:11 | belopolsky | create | |
|