[pypy-svn] r17772 - in pypy/dist/pypy: interpreter objspace/std

arigo at codespeak.net arigo at codespeak.net
Thu Sep 22 20:36:19 CEST 2005


Author: arigo
Date: Thu Sep 22 20:36:13 2005
New Revision: 17772

Modified:
   pypy/dist/pypy/interpreter/baseobjspace.py
   pypy/dist/pypy/interpreter/executioncontext.py
   pypy/dist/pypy/interpreter/pyopcode.py
   pypy/dist/pypy/objspace/std/objspace.py
Log:
Some forgotten variants of  space.is_true(space.is_(...)).


Modified: pypy/dist/pypy/interpreter/baseobjspace.py
==============================================================================
--- pypy/dist/pypy/interpreter/baseobjspace.py	(original)
+++ pypy/dist/pypy/interpreter/baseobjspace.py	Thu Sep 22 20:36:13 2005
@@ -441,7 +441,7 @@
         while check_list:
             w_item = check_list.pop()
             # Match identical items.
-            if self.is_true(self.is_(w_exc_type, w_item)):
+            if self.is_w(w_exc_type, w_item):
                 return True
             try:
                 # Match subclasses.

Modified: pypy/dist/pypy/interpreter/executioncontext.py
==============================================================================
--- pypy/dist/pypy/interpreter/executioncontext.py	(original)
+++ pypy/dist/pypy/interpreter/executioncontext.py	Thu Sep 22 20:36:13 2005
@@ -126,14 +126,14 @@
 
     def settrace(self, w_func):
         """Set the global trace function."""
-        if self.space.is_true(self.space.is_(w_func, self.space.w_None)):
+        if self.space.is_w(w_func, self.space.w_None):
             self.w_tracefunc = None
         else:
             self.w_tracefunc = w_func
 
     def setprofile(self, w_func):
         """Set the global trace function."""
-        if self.space.is_true(self.space.is_(w_func, self.space.w_None)):
+        if self.space.is_w(w_func, self.space.w_None):
             self.w_profilefunc = None
         else:
             self.w_profilefunc = w_func

Modified: pypy/dist/pypy/interpreter/pyopcode.py
==============================================================================
--- pypy/dist/pypy/interpreter/pyopcode.py	(original)
+++ pypy/dist/pypy/interpreter/pyopcode.py	Thu Sep 22 20:36:13 2005
@@ -357,8 +357,7 @@
                                      f.space.gettypeobject(PyCode.typedef))
         w_prog, w_globals, w_locals = f.space.unpacktuple(w_resulttuple, 3)
 
-        plain = (f.w_locals is not None and
-                 f.space.is_true(f.space.is_(w_locals, f.w_locals)))
+        plain = f.w_locals is not None and f.space.is_w(w_locals, f.w_locals)
         if plain:
             w_locals = f.getdictscope()
         pycode = f.space.interpclass_w(w_prog)

Modified: pypy/dist/pypy/objspace/std/objspace.py
==============================================================================
--- pypy/dist/pypy/objspace/std/objspace.py	(original)
+++ pypy/dist/pypy/objspace/std/objspace.py	Thu Sep 22 20:36:13 2005
@@ -364,7 +364,7 @@
         """Allocate the memory needed for an instance of an internal or
         user-defined type, without actually __init__ializing the instance."""
         w_type = self.gettypeobject(cls.typedef)
-        if self.is_true(self.is_(w_type, w_subtype)):
+        if self.is_w(w_type, w_subtype):
             instance =  instantiate(cls)
         else:
             w_subtype = w_type.check_user_subclass(w_subtype)



More information about the Pypy-commit mailing list