[pypy-svn] r5670 - pypy/trunk/src/pypy/objspace/std
rxe at codespeak.net
rxe at codespeak.net
Sun Jul 25 22:58:39 CEST 2004
Author: rxe
Date: Sun Jul 25 22:58:38 2004
New Revision: 5670
Modified:
pypy/trunk/src/pypy/objspace/std/boolobject.py
Log:
representation for debugging purposes. (Mainly for traceobjectspace's benefit)
Modified: pypy/trunk/src/pypy/objspace/std/boolobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/boolobject.py (original)
+++ pypy/trunk/src/pypy/objspace/std/boolobject.py Sun Jul 25 22:58:38 2004
@@ -12,6 +12,10 @@
def __nonzero__(w_self):
raise Exception, "you cannot do that, you must use space.is_true()"
+ def __repr__(w_self):
+ """ representation for debugging purposes """
+ return "%s(%s)" % (w_self.__class__.__name__, w_self.boolval)
+
registerimplementation(W_BoolObject)
# bool-to-int delegation requires translating the .boolvar attribute
More information about the Pypy-commit
mailing list