[pypy-svn] r58919 - in pypy/branch/2.5-merge/pypy/objspace/std: . test
arigo at codespeak.net
arigo at codespeak.net
Fri Oct 10 18:15:44 CEST 2008
Author: arigo
Date: Fri Oct 10 18:15:43 2008
New Revision: 58919
Modified:
pypy/branch/2.5-merge/pypy/objspace/std/builtinshortcut.py
pypy/branch/2.5-merge/pypy/objspace/std/test/test_builtinshortcut.py
Log:
We cannot support {get,set,del}slice in builtinshortcut right now
(see comment there).
Modified: pypy/branch/2.5-merge/pypy/objspace/std/builtinshortcut.py
==============================================================================
--- pypy/branch/2.5-merge/pypy/objspace/std/builtinshortcut.py (original)
+++ pypy/branch/2.5-merge/pypy/objspace/std/builtinshortcut.py Fri Oct 10 18:15:43 2008
@@ -22,7 +22,6 @@
'len', 'nonzero', 'repr', 'str', 'hash',
'neg', 'invert', 'index', 'iter', 'next', 'buffer',
'getitem', 'setitem', 'int',
- 'getslice', 'setslice',
# in-place
'inplace_add', 'inplace_sub', 'inplace_mul', 'inplace_truediv',
'inplace_floordiv', 'inplace_div', 'inplace_mod', 'inplace_pow',
@@ -33,11 +32,16 @@
KNOWN_MISSING = ['getattr', # mostly non-builtins or optimized by CALL_METHOD
'setattr', 'delattr', 'userdel', # mostly for non-builtins
'get', 'set', 'delete', # uncommon (except on functions)
- 'delitem', 'delslice', # rare stuff?
+ 'getslice', 'setslice', 'delslice', # see below
+ 'delitem', # rare stuff?
'abs', 'hex', 'oct', # rare stuff?
'pos', 'divmod', 'cmp', # rare stuff?
'float', 'long', 'coerce', # rare stuff?
]
+# We cannot support {get,set,del}slice right now because
+# DescrOperation.{get,set,del}slice do a bit more work than just call
+# the special methods: they call old_slice_range(). See e.g.
+# test_builtinshortcut.AppTestString.
for _name, _, _, _specialmethods in ObjSpace.MethodTable:
if _specialmethods:
Modified: pypy/branch/2.5-merge/pypy/objspace/std/test/test_builtinshortcut.py
==============================================================================
--- pypy/branch/2.5-merge/pypy/objspace/std/test/test_builtinshortcut.py (original)
+++ pypy/branch/2.5-merge/pypy/objspace/std/test/test_builtinshortcut.py Fri Oct 10 18:15:43 2008
@@ -1,5 +1,6 @@
from pypy.objspace.std.test import test_userobject
from pypy.objspace.std.test import test_set
+from pypy.objspace.std.test import test_stringobject
WITH_BUILTINSHORTCUT = {'objspace.std.builtinshortcut': True}
@@ -38,3 +39,8 @@
def setup_class(cls):
from pypy import conftest
cls.space = conftest.gettestobjspace(**WITH_BUILTINSHORTCUT)
+
+class AppTestString(test_stringobject.AppTestStringObject):
+ def setup_class(cls):
+ from pypy import conftest
+ cls.space = conftest.gettestobjspace(**WITH_BUILTINSHORTCUT)
More information about the Pypy-commit
mailing list