This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients eric.araujo, lemburg, loewis, pitrou, vstinner
Date 2010-05-28.13:02:21
SpamBayes Score 0.0288075
Marked as misclassified No
Message-id <1275051738.3101.7.camel@localhost.localdomain>
In-reply-to <>
> class BinaryDataCodec(codecs.Codec):
>     # Note: Binding these as C functions will result in the class not
>     # converting them to methods. This is intended.
>     encode = codecs.readbuffer_encode
>     decode = codecs.latin_1_decode

What's the point, though? Creating a non-symmetrical codec doesn't sound
like a very useful or recommandable thing to do. Especially in the py3k
codec model where encode() only works on unicode objects.

> While it's possible to emulate the functions via other methods,
> these methods always introduce intermediate objects, which isn't
> necessary and only costs performance.

The bytes() constructor doesn't (shouldn't) create any more intermediate
objects than read/charbuffer_encode() do.

And all this doesn't address the fact that these functions have never
been documented, and don't seem used in the outside world
(understandably so, since there's no way to know about their existence,
and their intended use).
Date User Action Args
2010-05-28 13:02:23pitrousetrecipients: + pitrou, lemburg, loewis, vstinner, eric.araujo
2010-05-28 13:02:21pitroulinkissue8838 messages
2010-05-28 13:02:21pitroucreate