[pypy-commit] pypy py3k: sync w/ default

pjenvey noreply at buildbot.pypy.org
Wed May 7 02:22:17 CEST 2014


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r71359:725222628d38
Date: 2014-05-06 17:21 -0700
http://bitbucket.org/pypy/pypy/changeset/725222628d38/

Log:	sync w/ default

diff --git a/rpython/tool/disassembler.py b/rpython/tool/disassembler.py
--- a/rpython/tool/disassembler.py
+++ b/rpython/tool/disassembler.py
@@ -73,9 +73,9 @@
     if type(x) is types.InstanceType:
         x = x.__class__
     if hasattr(x, 'im_func'):
-        x = x.__func__
+        x = x.im_func
     if hasattr(x, 'func_code'):
-        x = x.__code__
+        x = x.func_code
     if hasattr(x, '__dict__'):
         xxx
         items = sorted(x.__dict__.items())
@@ -83,11 +83,11 @@
             if type(x1) in (types.MethodType,
                             types.FunctionType,
                             types.CodeType,
-                            type):
+                            types.ClassType):
                 print("Disassembly of %s:" % name)
                 try:
                     dis(x1)
-                except TypeError as msg:
+                except TypeError, msg:
                     print("Sorry:", msg)
                 print()
     elif hasattr(x, 'co_code'):


More information about the pypy-commit mailing list