[pypy-commit] pypy ffi-backend: a missing str

fijal noreply at buildbot.pypy.org
Tue Jun 26 22:16:48 CEST 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: ffi-backend
Changeset: r55846:7a41ab3a8ba7
Date: 2012-06-26 15:47 +0200
http://bitbucket.org/pypy/pypy/changeset/7a41ab3a8ba7/

Log:	a missing str

diff --git a/lib_pypy/disassembler.py b/lib_pypy/disassembler.py
--- a/lib_pypy/disassembler.py
+++ b/lib_pypy/disassembler.py
@@ -24,6 +24,11 @@
         self.lineno = lineno
         self.line_starts_here = False
 
+    def __str__(self):
+        if self.arg is None:
+            return "%s" % (self.__class__.__name__,)
+        return "%s (%s)" % (self.__class__.__name__, self.arg)
+
     def __repr__(self):
         if self.arg is None:
             return "<%s at %d>" % (self.__class__.__name__, self.pos)


More information about the pypy-commit mailing list