[issue20405] Add io.BinaryTransformWrapper and a "transform" parameter to open()

Marc-Andre Lemburg report at bugs.python.org
Mon Jan 27 11:26:11 CET 2014


Marc-Andre Lemburg added the comment:

On 27.01.2014 11:00, STINNER Victor wrote:
> 
> STINNER Victor added the comment:
> 
> I agree with Antoine, I dislike the idea of BinaryTransformWrapper, it remembers me the evil codecs.EncodedFile thing.
>
> What are the usecases?

Ever used "recode" ?

The purpose of EncodedFile/StreamRecoder was to convert an externally
used encoding to a standard internal one - mainly to allow programs
that didn't want to use Unicode for processing to still benefit from
the codecs that come with Python.

E.g. the example at the end of codecs.py allows using Latin-1 within
the application, while talking to the console using UTF-8.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20405>
_______________________________________


More information about the Python-bugs-list mailing list