Author: Manuel Jacob <[email protected]>
Branch: py3.3
Changeset: r76153:b9de1d50ab49
Date: 2015-02-25 19:32 +0100
http://bitbucket.org/pypy/pypy/changeset/b9de1d50ab49/

Log:    Change memoryview.suboffsets to be an empty tuple instead of None.

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
@@ -144,7 +144,7 @@
     def w_get_suboffsets(self, space):
         self._check_released(space)
         # I've never seen anyone filling this field
-        return space.w_None
+        return space.newtuple([])
 
     def descr_repr(self, space):
         if self.buf is None:
diff --git a/pypy/objspace/std/test/test_memoryobject.py 
b/pypy/objspace/std/test/test_memoryobject.py
--- a/pypy/objspace/std/test/test_memoryobject.py
+++ b/pypy/objspace/std/test/test_memoryobject.py
@@ -44,7 +44,7 @@
 
     def test_suboffsets(self):
         v = memoryview(b"a"*100)
-        assert v.suboffsets == None
+        assert v.suboffsets == ()
 
     def test_compare(self):
         assert memoryview(b"abc") == b"abc"
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to