[pypy-commit] pypy default: change how some code is organized, fixes the failing test_pypy_c tests hopefully

alex_gaynor noreply at buildbot.pypy.org
Sun Oct 2 17:42:49 CEST 2011


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: 
Changeset: r47769:e28ade06eff5
Date: 2011-10-02 11:42 -0400
http://bitbucket.org/pypy/pypy/changeset/e28ade06eff5/

Log:	change how some code is organized, fixes the failing test_pypy_c
	tests hopefully

diff --git a/pypy/objspace/std/typeobject.py b/pypy/objspace/std/typeobject.py
--- a/pypy/objspace/std/typeobject.py
+++ b/pypy/objspace/std/typeobject.py
@@ -77,7 +77,7 @@
         for i in range(len(self.lookup_where)):
             self.lookup_where[i] = None_None
 
-# possible values of compares_by_identity_status 
+# possible values of compares_by_identity_status
 UNKNOWN = 0
 COMPARES_BY_IDENTITY = 1
 OVERRIDES_EQ_CMP_OR_HASH = 2
@@ -358,7 +358,7 @@
                 if w_value is not None:
                     return w_value
         return None
-                
+
     @unroll_safe
     def _lookup(w_self, key):
         space = w_self.space
@@ -854,7 +854,8 @@
         single_arg = False
     else:
         single_arg = True
-    if call_init and not (space.is_w(w_type, space.w_type) and single_arg):
+    if (call_init and not (space.is_w(w_type, space.w_type) and
+        not __args__.keywords and len(__args__.arguments_w) == 1)):
         w_descr = space.lookup(w_newobject, '__init__')
         w_result = space.get_and_call_args(w_descr, w_newobject, __args__)
         if not space.is_w(w_result, space.w_None):


More information about the pypy-commit mailing list