small corrections in too few argument errors

This commit is contained in:
Dave Halter
2014-05-26 17:38:14 +02:00
parent 425f7a8b64
commit 720907531b
2 changed files with 9 additions and 2 deletions

View File

@@ -2,6 +2,7 @@
# normal arguments (no keywords)
# -----------------
def simple(a):
return a
@@ -36,7 +37,13 @@ simple(1, a=1)
def two_params(x, y):
return y
two_params(y=2, x=1)
two_params(1, y=2)
#! 10 type-error
# The next two statements should generate errors. Basically it should generate
# something like `TypeError: x() got multiple values for keyword argument 'a'`.
# For now however, any error should be fine.
two_params(1, x=2)
#! 17 type-error-too-many-arguments
two_params(1, 2, y=3)