[pypy-svn] r7795 - pypy/trunk/src/pypy/interpreter
arigo at codespeak.net
arigo at codespeak.net
Thu Dec 9 22:25:54 CET 2004
Author: arigo
Date: Thu Dec 9 22:25:54 2004
New Revision: 7795
Modified:
pypy/trunk/src/pypy/interpreter/argument.py
Log:
Fix the following misleading error message:
>>> def f(x, *y): pass
...
>>> f()
TypeError: f() takes exactly 1 argument (0 given)
^^^^^^^
Modified: pypy/trunk/src/pypy/interpreter/argument.py
==============================================================================
--- pypy/trunk/src/pypy/interpreter/argument.py (original)
+++ pypy/trunk/src/pypy/interpreter/argument.py Thu Dec 9 22:25:54 2004
@@ -197,7 +197,7 @@
nargs)
else:
defcount = len(defaults_w)
- if defcount == 0:
+ if defcount == 0 and varargname is None:
msg1 = "exactly"
elif too_many:
msg1 = "at most"
More information about the Pypy-commit
mailing list