Gabriel Genellina <gagsl-py2 <at> yahoo.com.ar> writes:
>> There is another alternative that relies on undocumented behaviour: use
> open to create a *binary* file and wrap the resulting BufferedReader
> object in your own TextIOWrapper.
How is that undocumented behavior? TextIOWrapper can wrap any buffer which
follows the io.BufferedIOBase ABC. BufferedReader is a subclass of
io.BufferedIOBase.