[issue5517] 2to3 haven't convert buffer object to memoryview

2009-03-19 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2to3 will convert buffer to memoryview, but not by default because as you can see, it can be wrong. (Pass "-f buffer" to 2to3.) You can only use memoryviews on bytes-like objects like b'a', and not unicode strings (This is like 2.x.). -- nosy: +benja

[issue5517] 2to3 haven't convert buffer object to memoryview

2009-03-19 Thread Haoyu Bai
New submission from Haoyu Bai : The following example is valid in Python 2.6: a = 'abc' b = buffer(a) print([repr(c) for c in b]) After 2to3 it, the 'buffer' isn't changed to memoryview, so then it is not valid program in Python 3: Traceback (most recent call last): File "bufferobj3.py", lin