Commits

Philip Jenvey  committed 0596172

space.isinstance -> space.isinstance_w

  • Participants
  • Parent commits ce1c1b2

Comments (0)

Files changed (2)

File pypy/module/_file/interp_file.py

         return self.getrepr(self.space, info)
 
     def getdisplayname(self):
+        space = self.space
         w_name = self.w_name
         if w_name is None:
             return '?'
-        elif self.space.is_true(self.space.isinstance(w_name,
-                                                      self.space.w_str)):
-            return "'%s'" % self.space.str_w(w_name)
+        elif space.isinstance_w(w_name, space.w_str):
+            return "'%s'" % space.str_w(w_name)
         else:
-            return self.space.str_w(self.space.repr(w_name))
+            return space.str_w(space.repr(w_name))
 
     def file_writelines(self, w_lines):
         """writelines(sequence_of_strings) -> None.  Write the strings to the file.

File pypy/objspace/std/complextype.py

     #
     # no '__complex__' method, so we assume it is a float,
     # unless it is an instance of some subclass of complex.
-    if space.is_true(space.isinstance(w_complex, space.gettypefor(W_ComplexObject))):
+    if space.isinstance_w(w_complex, space.gettypefor(W_ComplexObject)):
         real = space.float(space.getattr(w_complex, space.wrap("real")))
         imag = space.float(space.getattr(w_complex, space.wrap("imag")))
         return (space.float_w(real), space.float_w(imag))