[Python-checkins] r82981 - python/branches/release27-maint/Doc/library/stdtypes.rst
antoine.pitrou
python-checkins at python.org
Mon Jul 19 20:10:42 CEST 2010
Author: antoine.pitrou
Date: Mon Jul 19 20:10:42 2010
New Revision: 82981
Log:
Issue #9304: fix example in the 2.x memoryview documentation.
Modified:
python/branches/release27-maint/Doc/library/stdtypes.rst
Modified: python/branches/release27-maint/Doc/library/stdtypes.rst
==============================================================================
--- python/branches/release27-maint/Doc/library/stdtypes.rst (original)
+++ python/branches/release27-maint/Doc/library/stdtypes.rst Mon Jul 19 20:10:42 2010
@@ -2574,7 +2574,7 @@
'g'
>>> v[1:4]
<memory at 0x77ab28>
- >>> str(v[1:4])
+ >>> v[1:4].tobytes()
'bce'
If the object the memoryview is over supports changing its data, the
@@ -2612,7 +2612,7 @@
Return the data in the buffer as a list of integers. ::
- >>> memoryview(b'abc').tolist()
+ >>> memoryview("abc").tolist()
[97, 98, 99]
There are also several readonly attributes available:
More information about the Python-checkins
mailing list