benjamin.peterson
2008-09-10 21:31:58 UTC
Author: benjamin.peterson
Date: Wed Sep 10 23:31:58 2008
New Revision: 66372
Log:
endow memoryview.tolist() with docs
Modified:
python/branches/py3k/Doc/library/stdtypes.rst
Modified: python/branches/py3k/Doc/library/stdtypes.rst
==============================================================================
--- python/branches/py3k/Doc/library/stdtypes.rst (original)
+++ python/branches/py3k/Doc/library/stdtypes.rst Wed Sep 10 23:31:58 2008
@@ -2283,11 +2283,18 @@
Notice how the size of the memoryview object can not be changed.
- :class:`memoryview` has one method:
+ :class:`memoryview` has two methods:
.. method:: tobytes()
- Convert the data in the buffer to a bytestring and return it.
+ Return the data in the buffer as a bytestring.
+
+ .. method:: tolist()
+
+ Return the data in the buffer as a list of integers. ::
+
+ >>> memoryview(b'abc').tolist()
+ [97, 98, 99]
There are also several readonly attributes available:
Date: Wed Sep 10 23:31:58 2008
New Revision: 66372
Log:
endow memoryview.tolist() with docs
Modified:
python/branches/py3k/Doc/library/stdtypes.rst
Modified: python/branches/py3k/Doc/library/stdtypes.rst
==============================================================================
--- python/branches/py3k/Doc/library/stdtypes.rst (original)
+++ python/branches/py3k/Doc/library/stdtypes.rst Wed Sep 10 23:31:58 2008
@@ -2283,11 +2283,18 @@
Notice how the size of the memoryview object can not be changed.
- :class:`memoryview` has one method:
+ :class:`memoryview` has two methods:
.. method:: tobytes()
- Convert the data in the buffer to a bytestring and return it.
+ Return the data in the buffer as a bytestring.
+
+ .. method:: tolist()
+
+ Return the data in the buffer as a list of integers. ::
+
+ >>> memoryview(b'abc').tolist()
+ [97, 98, 99]
There are also several readonly attributes available: