Author: Antonio Cuni <[email protected]>
Branch: cpyext-avoid-roundtrip
Changeset: r92730:a79aad3bfd78
Date: 2017-10-12 10:20 +0200
http://bitbucket.org/pypy/pypy/changeset/a79aad3bfd78/
Log: add a proper repr for this class, else its repr() is StdObjSpace,
which is veeeery confusing. Hoorray old style classes
diff --git a/pypy/module/cpyext/test/test_api.py
b/pypy/module/cpyext/test/test_api.py
--- a/pypy/module/cpyext/test/test_api.py
+++ b/pypy/module/cpyext/test/test_api.py
@@ -25,6 +25,10 @@
cls.preload_builtins(space)
class CAPI:
+ def __repr__(self):
+ return '<%s.%s instance>' % (self.__class__.__module__,
+ self.__class__.__name__)
+
def __getattr__(self, name):
return getattr(cls.space, name)
cls.api = CAPI()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit