1. Pypy
  2. Untitled project
  3. pypy

Commits

Justin Peel  committed 1b6922c

make isinstance_w not wrap and unwrap a bool. (flow space is happy too).

  • Participants
  • Parent commits f7b15eb
  • Branches default

Comments (0)

Files changed (2)

File pypy/objspace/descroperation.py

View file
         return space._type_issubtype(w_sub, w_type)
 
     def isinstance(space, w_inst, w_type):
+        return space.wrap(space._type_isinstance(w_inst, w_type))
+
+    def isinstance_w(space, w_inst, w_type):
         return space._type_isinstance(w_inst, w_type)
 
     def issubtype_allow_override(space, w_sub, w_type):

File pypy/objspace/std/objspace.py

View file
 
     def _type_isinstance(self, w_inst, w_type):
         if isinstance(w_type, W_TypeObject):
-            return self.wrap(self.type(w_inst).issubtype(w_type))
+            return self.type(w_inst).issubtype(w_type)
         raise OperationError(self.w_TypeError, self.wrap("need type object"))