[pypy-svn] r57941 - in pypy/branch/tuple-nonresizable-395/pypy/annotation: . test
fijal at codespeak.net
fijal at codespeak.net
Sun Sep 7 13:14:42 CEST 2008
Author: fijal
Date: Sun Sep 7 13:14:40 2008
New Revision: 57941
Modified:
pypy/branch/tuple-nonresizable-395/pypy/annotation/listdef.py
pypy/branch/tuple-nonresizable-395/pypy/annotation/test/test_annrpython.py
Log:
Rename dont_resize_any_more to never_resize and also check for the fact
that list should not be resizable at all
Modified: pypy/branch/tuple-nonresizable-395/pypy/annotation/listdef.py
==============================================================================
--- pypy/branch/tuple-nonresizable-395/pypy/annotation/listdef.py (original)
+++ pypy/branch/tuple-nonresizable-395/pypy/annotation/listdef.py Sun Sep 7 13:14:40 2008
@@ -182,7 +182,9 @@
self.listitem.mutate()
self.listitem.resize()
- def dont_resize_any_more(self):
+ def never_resize(self):
+ if self.listitem.resized:
+ raise TooLateForChange()
self.listitem.dont_resize = True
Modified: pypy/branch/tuple-nonresizable-395/pypy/annotation/test/test_annrpython.py
==============================================================================
--- pypy/branch/tuple-nonresizable-395/pypy/annotation/test/test_annrpython.py (original)
+++ pypy/branch/tuple-nonresizable-395/pypy/annotation/test/test_annrpython.py Sun Sep 7 13:14:40 2008
@@ -3047,7 +3047,7 @@
def checker(ann, bk):
called.append(True)
assert not ann.listdef.listitem.mutated
- ann.listdef.dont_resize_any_more()
+ ann.listdef.never_resize()
def f():
l = [1,2,3]
More information about the Pypy-commit
mailing list