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

2007-09-20 Thread Christian Heimes
Greg Ewing wrote: > Christian Heimes wrote: >> With Python 2.5 the input and output data isn't implicitly >> converted > > Are you sure that's always true? What about systems > where newlines aren't \n? Windows is a strange beast. As far as I can remember the OS converts the incoming and outgoing

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

2007-09-20 Thread Eric Smith
Christian Heimes wrote: > Greg Ewing wrote: >> Christian Heimes wrote: >>> With Python 2.5 the input and output data isn't implicitly >>> converted >> Are you sure that's always true? What about systems >> where newlines aren't \n? > > Windows is a strange beast. As far as I can remember the OS co

Re: [Python-3000] Extension: mpf for GNU MP floating point

2007-09-20 Thread Adam Hupp
On 9/19/07, Rob Crowther <[EMAIL PROTECTED]> wrote: > If you try to set value to something weird, like a dictionary, it will > segfault. PyString_Check wasn't working for me. It's in there, but defined > out. I think you'll need to use PyUnicode_Check for that. -- Adam Hupp | http://hupp.org/ada

Re: [Python-3000] Immutable bytes -- looking for volunteer

2007-09-20 Thread Adam Hupp
On 9/20/07, Jeffrey Yasskin <[EMAIL PROTECTED]> wrote: > I've attached a very preliminary patch for this. It makes bytes > immutable but doesn't do either of the other suggested changes. It's > enough to make the tests run, but doesn't do anything to make them > pass. The test results so far are:

Re: [Python-3000] Unicode and OS strings

2007-09-20 Thread martin
> On Linux, filenames are *byte* string and not *character* string. That's not true, although this is a wide-spread misunderstanding. The POSIX standard defines that the file names must be a superset of the portable character set, which includes things such as '/', which is the path separator. >

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

2007-09-20 Thread Bill Janssen
Greg Ewing writes: > Christian Heimes writes: > > I recommend that the problem and fix gets documented. Maybe stdin, > > stdout and stderr should get a method that disables the implicit > > conversion like setMode("b") / setMode("t"). > > Or maybe another set of objects called stdbin, stdbout, std

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

2007-09-20 Thread Guido van Rossum
On 9/20/07, Bill Janssen <[EMAIL PROTECTED]> wrote: > Greg Ewing writes: > > Christian Heimes writes: > > > I recommend that the problem and fix gets documented. Maybe stdin, > > > stdout and stderr should get a method that disables the implicit > > > conversion like setMode("b") / setMode("t"). >

Re: [Python-3000] Implementing Abstract Interface for Numbers

2007-09-20 Thread Thomas Wouters
On 9/19/07, Rob Crowther <[EMAIL PROTECTED]> wrote: > > This is the documentation for PyNumberMethods right now. > > PyNumberMethods *tp_as_number; > XXX > > > I've managed to wrap GNU MP floats and add rich comparisons, but there's a > sore lack of documentation on how to implement the Number inte

Re: [Python-3000] Immutable bytes -- looking for volunteer

2007-09-20 Thread Jeffrey Yasskin
On 9/20/07, Adam Hupp <[EMAIL PROTECTED]> wrote: > On 9/20/07, Jeffrey Yasskin <[EMAIL PROTECTED]> wrote: > > I've attached a very preliminary patch for this. It makes bytes > > immutable but doesn't do either of the other suggested changes. It's > > enough to make the tests run, but doesn't do any

Re: [Python-3000] Immutable bytes -- looking for volunteer

2007-09-20 Thread Terry Reedy
"Jeffrey Yasskin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | On 9/20/07, Adam Hupp <[EMAIL PROTECTED]> wrote: || > | > I have fixes for the following: ... | > I'll post a patch later today. | | Thanks for the help! This brings up a policy question: For patches | like the one I'

Re: [Python-3000] Immutable bytes -- looking for volunteer

2007-09-20 Thread Guido van Rossum
On 9/20/07, Jeffrey Yasskin <[EMAIL PROTECTED]> wrote: > On 9/20/07, Adam Hupp <[EMAIL PROTECTED]> wrote: > > On 9/20/07, Jeffrey Yasskin <[EMAIL PROTECTED]> wrote: > > > I've attached a very preliminary patch for this. It makes bytes > > > immutable but doesn't do either of the other suggested cha

Re: [Python-3000] Immutable bytes -- looking for volunteer

2007-09-20 Thread Adam Hupp
On 9/20/07, Jeffrey Yasskin <[EMAIL PROTECTED]> wrote: > > Thanks for the help! This brings up a policy question: For patches > like the one I've attached here, do we want to start submitting them > now, or build up a mondo patch to fix them all at once? My changes are here: http://bugs.python.or

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

2007-09-20 Thread Greg Ewing
Bill Janssen wrote: > Nice idea, but it would have been a tad more true to the origin of the > names if "stdin", "stderr", and "stdout" were binary (as the re-use of > those fine names automatically implies to anyone who knows what > they're doing) No, the names only imply that to Unix users who