From: Benjamin Peterson <benjamin@python.org>
Date: Wed, 10 Sep 2008 21:31:58 +0000 (+0000)
Subject: endow memoryview.tolist() with docs
X-Git-Tag: v3.0rc1~32
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c8046511945149abc822e2a7d7bdba682bd9ed3;p=python

endow memoryview.tolist() with docs
---

diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index a03346a392..7f295a1fb0 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -2283,11 +2283,18 @@ simple bytes or complex data structures.
    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: