[pypy-svn] r56942 - in pypy/branch/garden-call-code/pypy/interpreter: . test
pedronis at codespeak.net
pedronis at codespeak.net
Sun Aug 3 16:31:58 CEST 2008
Author: pedronis
Date: Sun Aug 3 16:31:57 2008
New Revision: 56942
Modified:
pypy/branch/garden-call-code/pypy/interpreter/argument.py
pypy/branch/garden-call-code/pypy/interpreter/test/test_function.py
Log:
streamline: behave like CPython in this respect
Modified: pypy/branch/garden-call-code/pypy/interpreter/argument.py
==============================================================================
--- pypy/branch/garden-call-code/pypy/interpreter/argument.py (original)
+++ pypy/branch/garden-call-code/pypy/interpreter/argument.py Sun Aug 3 16:31:57 2008
@@ -241,7 +241,6 @@
input_argcount = 0
if w_firstarg is not None:
- blindargs = blindargs or 1
upfront = 1
if co_argcount > 0:
scope_w[0] = w_firstarg
@@ -446,7 +445,6 @@
input_argcount = 0
if w_firstarg is not None:
- blindargs = blindargs or 1
upfront = 1
if co_argcount > 0:
scope_w[0] = w_firstarg
Modified: pypy/branch/garden-call-code/pypy/interpreter/test/test_function.py
==============================================================================
--- pypy/branch/garden-call-code/pypy/interpreter/test/test_function.py (original)
+++ pypy/branch/garden-call-code/pypy/interpreter/test/test_function.py Sun Aug 3 16:31:57 2008
@@ -160,8 +160,18 @@
return self, kw
func = A().func
- func(self=23) # XXX different behavior from CPython
- # xxx raises(TypeError, func, self=23)
+ # don't want the extra argument passing of raises
+ try:
+ func(self=23)
+ assert False
+ except TypeError:
+ pass
+
+ try:
+ func(**{'self': 23})
+ assert False
+ except TypeError:
+ pass
def test_kwargs_confusing_name(self):
def func(self): # 'self' conflicts with the interp-level
More information about the Pypy-commit
mailing list