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

skip at pobox.com skip at pobox.com
Mon Oct 1 19:14:40 CEST 2007


    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, but numpy's do.
How much overlap is there between the three types?  Does it make sense to
consider that canonical underlying array type now (or in the near future,
sometime before the release of 3.0 final)?

Skip


More information about the Python-3000 mailing list