[Python-3000] More uniform treatment of files' newlines attribute?

2007-09-23 Thread skip
While editing the documentation of the builtin open function, I noticed that the newlines attributes can take on three different value types: None, strings or tuples of strings. It seems to me it would be better if was always a set containing the newline values seen so far. There's no testing ne

Re: [Python-3000] New io system and binary data

2007-09-23 Thread Skip Montanaro
> P.S.: If opening files on Linux is now to be semantically meaningful, > then the documentation on that section also needs to change. Currently > it appears to mean that it's a meaningless specification that will be > ignored unless you happen to be using the MSWindows platform. I just checked

Re: [Python-3000] New io system and binary data

2007-09-23 Thread Martin v. Löwis
> The problem here seems to be that this isn't currently well documented. > I've got no objection to using the buffer attribute... Ok, then it seems you missed the obvious way: Open the file in binary mode ('rb' or 'wb') if you want to read or write bytes. It has always been that way in Python;

Re: [Python-3000] New io system and binary data

2007-09-23 Thread Charles D Hixson
Brett Cannon wrote: > On 9/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> Guido> You can repeat that until you're blue in the face but it's not >> Guido> going to change. Way more programs (especially simple ones) deal >> Guido> with txet than with binary data. >> >> For us

Re: [Python-3000] New io system and binary data

2007-09-23 Thread Martin v. Löwis
> So there needs to be an easy and obvious way to deal with files whose > records are arrays of byte valued data...that is commonly manipulated by > an editor using ascii-8. Did you follow the thread at all? There is an easy and obvious way to deal with such files. Regards, Martin _

Re: [Python-3000] New io system and binary data

2007-09-23 Thread Charles D Hixson
Guido van Rossum wrote: > On 9/19/07, Bill Janssen <[EMAIL PROTECTED]> wrote: > >> This really isn't a UTF-8 problem. It is the problem with file opens >> defaulting to "text" mode instead of "binary" mode rearing its ugly >> head again. >> > > You can repeat that until you're blue in the