This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bhy
Recipients bhy
Date 2009-03-19.07:10:59
SpamBayes Score 1.6008694e-11
Marked as misclassified No
Message-id <1237446662.62.0.531396044064.issue5517@psf.upfronthosting.co.za>
In-reply-to
Content
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!
History
Date User Action Args
2009-03-19 07:11:03bhysetrecipients: + bhy
2009-03-19 07:11:02bhysetmessageid: <1237446662.62.0.531396044064.issue5517@psf.upfronthosting.co.za>
2009-03-19 07:11:00bhylinkissue5517 messages
2009-03-19 07:10:59bhycreate