[pypy-svn] r5275 - in pypy/trunk/src/pypy: objspace/flow translator/test
arigo at codespeak.net
arigo at codespeak.net
Thu Jun 24 20:33:44 CEST 2004
Author: arigo
Date: Thu Jun 24 20:33:43 2004
New Revision: 5275
Modified:
pypy/trunk/src/pypy/objspace/flow/objspace.py
pypy/trunk/src/pypy/translator/test/test_annrpython.py
Log:
Three tests failed. Fixed.
Modified: pypy/trunk/src/pypy/objspace/flow/objspace.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/flow/objspace.py (original)
+++ pypy/trunk/src/pypy/objspace/flow/objspace.py Thu Jun 24 20:33:43 2004
@@ -73,14 +73,11 @@
if w_start is None: w_start = self.w_None
if w_stop is None: w_stop = self.w_None
if w_step is None: w_step = self.w_None
- try:
- content = slice(self.unwrap(w_start),
- self.unwrap(w_stop),
- self.unwrap(w_step))
- except UnwrapException:
- return self.do_operation('newslice', w_start, w_stop, w_step)
- else:
- return Constant(content)
+ if self.concrete_mode:
+ return Constant(slice(self.unwrap(w_start),
+ self.unwrap(w_stop),
+ self.unwrap(w_step)))
+ return self.do_operation('newslice', w_start, w_stop, w_step)
def wrap(self, obj):
if isinstance(obj, (Variable, Constant)):
Modified: pypy/trunk/src/pypy/translator/test/test_annrpython.py
==============================================================================
--- pypy/trunk/src/pypy/translator/test/test_annrpython.py (original)
+++ pypy/trunk/src/pypy/translator/test/test_annrpython.py Thu Jun 24 20:33:43 2004
@@ -159,7 +159,7 @@
s = a.build_types(snippet.inheritance1, [])
# result should be exactly:
self.assertEquals(s, annmodel.SomeTuple([
- annmodel.SomeTuple([]),
+ annmodel.immutablevalue(()),
annmodel.SomeInteger()
]))
More information about the Pypy-commit
mailing list