[pypy-commit] pypy default: this hasn't been problem for a several python versions

gutworth noreply at buildbot.pypy.org
Sun Mar 11 20:24:07 CET 2012


Author: Benjamin Peterson <benjamin at python.org>
Branch: 
Changeset: r53297:811d838ebad8
Date: 2012-03-11 12:23 -0700
http://bitbucket.org/pypy/pypy/changeset/811d838ebad8/

Log:	this hasn't been problem for a several python versions

diff --git a/pypy/objspace/flow/operation.py b/pypy/objspace/flow/operation.py
--- a/pypy/objspace/flow/operation.py
+++ b/pypy/objspace/flow/operation.py
@@ -30,10 +30,7 @@
 
 def new_style_type(x):
     """Simulate a situation where every class is new-style"""
-    t = getattr(x, '__class__', type(x))
-    if t is types.ClassType:   # guess who's here?  exception classes...
-        t = type
-    return t
+    return getattr(x, '__class__', type(x))
 
 def do_int(x):
     return x.__int__()


More information about the pypy-commit mailing list