Message83802
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", line 2, in <module>
b = buffer(a)
NameError: name 'buffer' is not defined
However even it changed to memoryview the program still not valid because:
>>> memoryview('a')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: cannot make memory view because object does not have the
buffer interface
I can reporduce this on both Python 3.0.1 and Python 3.1a1+ (py3k:70310).
Thanks! |
|
Date |
User |
Action |
Args |
2009-03-19 07:11:03 | bhy | set | recipients:
+ bhy |
2009-03-19 07:11:02 | bhy | set | messageid: <1237446662.62.0.531396044064.issue5517@psf.upfronthosting.co.za> |
2009-03-19 07:11:00 | bhy | link | issue5517 messages |
2009-03-19 07:10:59 | bhy | create | |
|