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
> 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
> 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;
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
> 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
_
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