Commits

Brian Kearns committed f1afb02

fix cpyext slot wrapper repr

  • Participants
  • Parent commits 2af214a
  • Branches fix-tpname

Comments (0)

Files changed (2)

pypy/module/cpyext/methodobject.py

     def descr_method_repr(self):
         return self.space.wrap("<slot wrapper '%s' of '%s' objects>" %
                                (self.method_name,
-                                self.w_objclass.getname(self.space)))
+                                self.w_objclass.name))
 
 def cwrapper_descr_call(space, w_self, __args__):
     self = space.interp_w(W_PyCWrapperObject, w_self)

pypy/module/cpyext/test/test_typeobject.py

         assert "copy" in repr(module.fooType.copy)
         assert repr(module.fooType) == "<type 'foo.foo'>"
         assert repr(obj2) == "<Foo>"
-        assert repr(module.fooType.__call__) == "<slot wrapper '__call__' of 'foo' objects>"
+        assert repr(module.fooType.__call__) == "<slot wrapper '__call__' of 'foo.foo' objects>"
         assert obj2(foo=1, bar=2) == dict(foo=1, bar=2)
 
         print(obj.foo)