- Original Message -
> From: Steven D'Aprano
> To: python-list@python.org
> Cc:
> Sent: Wednesday, March 4, 2015 8:56 PM
> Subject: Re: io.open vs. codecs.open
>
> Albert-Jan Roskam wrote:
>
>> Hi,
>>
>> Is there a (use case) diff
On 04/03/2015 19:56, Steven D'Aprano wrote:
Albert-Jan Roskam wrote:
Hi,
Is there a (use case) difference between codecs.open and io.open? What is
the difference? A small difference that I just discovered is that
codecs.open(somefile).read() returns a bytestring if no encoding is
specified*),
On Wed, Mar 4, 2015, at 07:12, Albert-Jan Roskam wrote:
> Hi,
>
> Is there a (use case) difference between codecs.open and io.open? What is
> the difference?
> A small difference that I just discovered is that
> codecs.open(somefile).read() returns a bytestring if no encoding is
> specified*), but
Albert-Jan Roskam wrote:
> Hi,
>
> Is there a (use case) difference between codecs.open and io.open? What is
> the difference? A small difference that I just discovered is that
> codecs.open(somefile).read() returns a bytestring if no encoding is
> specified*), but a unicode string if an encoding
Hi,
Is there a (use case) difference between codecs.open and io.open? What is the
difference?
A small difference that I just discovered is that codecs.open(somefile).read()
returns a bytestring if no encoding is specified*), but a unicode string if an
encoding is specified. io.open always retur