Re: [Python-3000] Last call for PEP 3137: Immutable Bytes and Mutable Buffer

2007-10-01 Thread Nick Coghlan
Brett Cannon wrote: > +1 from me. Looks good to me too: +1 I wouldn't mind seeing some iteration-in-C bit-bashing operations in there eventually, but they aren't needed on the first pass, and even being able to do things like the following will be a decent improvement over the status quo for l

Re: [Python-3000] [Python-Dev] building with -Wwrite-strings

2007-10-01 Thread Lisandro Dalcin
Yes, you are completely right. I ended up realizing that a change like this would break almost all third-party extension. But... What about of doing this for Py3K? Third-party extension have to be fixed anyway. On 10/1/07, Armin Rigo <[EMAIL PROTECTED]> wrote: > Hi Martin, > > On Fri, Sep 28, 20

[Python-3000] bytes vs. array.array vs. numpy.array

2007-10-01 Thread skip
Nick> I wouldn't mind seeing some iteration-in-C bit-bashing operations Nick> in there eventually... Nick>data = bytes([x & 0x1F for x in orig_data]) This begins to make it look what you want is array.array or nump.array. Python's arrays don't support bitwise operations either, b

Re: [Python-3000] bytes vs. array.array vs. numpy.array

2007-10-01 Thread Nick Coghlan
[EMAIL PROTECTED] wrote: > Nick> I wouldn't mind seeing some iteration-in-C bit-bashing operations > Nick> in there eventually... > > Nick>data = bytes([x & 0x1F for x in orig_data]) > > This begins to make it look what you want is array.array or nump.array. > Python's arrays don'

Re: [Python-3000] bytes vs. array.array vs. numpy.array

2007-10-01 Thread Greg Ewing
Nick Coghlan wrote: > numpy would be a big dependency to bring in just to > get more efficient bit-oriented operations on a byte sequence Random thought - if long integers were to use byte sequences internally to hold their data, it might be possible to get this more or less for free in terms of

Re: [Python-3000] Last call for PEP 3137: Immutable Bytes and Mutable Buffer

2007-10-01 Thread Terry Reedy
"Nick Coghlan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Brett Cannon wrote: | > +1 from me. | | Looks good to me too: +1 | | I wouldn't mind seeing some iteration-in-C bit-bashing operations in | there eventually, but they aren't needed on the first pass, and even | being abl