Re: io.open vs. codecs.open

2015-03-06 Thread Albert-Jan Roskam
- 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

Re: io.open vs. codecs.open

2015-03-04 Thread Mark Lawrence
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*),

Re: io.open vs. codecs.open

2015-03-04 Thread random832
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

Re: io.open vs. codecs.open

2015-03-04 Thread Steven D'Aprano
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

io.open vs. codecs.open

2015-03-04 Thread Albert-Jan Roskam
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