Commit b22bf80d authored by Antoine Pitrou's avatar Antoine Pitrou

Issue #9304: fix example in the 2.x memoryview documentation.

parent 0b9201fa
......@@ -2574,7 +2574,7 @@ is generally interpreted as simple bytes.
'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 @@ is generally interpreted as simple bytes.
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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment