Author: Ronan Lamy <[email protected]>
Branch: PyBuffer-backport
Changeset: r91224:ed953d9e05ef
Date: 2017-05-10 19:15 +0100
http://bitbucket.org/pypy/pypy/changeset/ed953d9e05ef/

Log:    Add missing W_MemoryView.copy()

diff --git a/pypy/objspace/std/memoryobject.py 
b/pypy/objspace/std/memoryobject.py
--- a/pypy/objspace/std/memoryobject.py
+++ b/pypy/objspace/std/memoryobject.py
@@ -128,6 +128,12 @@
         else:
             raise TypeError("memoryview: invalid slice key")
 
+    @staticmethod
+    def copy(w_view):
+        # TODO suboffsets
+        view = w_view.view
+        return W_MemoryView(view)
+
     def descr_setitem(self, space, w_index, w_obj):
         self._check_released(space)
         if self.view.readonly:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to