Skip to content

Commit cbcda57

Browse files
committed
Fix function exception message
1 parent f9b0894 commit cbcda57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

py/function.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ func (f *Function) LocalsForCall(args Tuple) StringDict {
9494
min := max - len(f.Defaults)
9595
if len(args) > max || len(args) < min {
9696
if min == max {
97-
panic(ExceptionNewf(TypeError, "%s() takes %d positional arguments but %d were given", f.Name, max))
97+
panic(ExceptionNewf(TypeError, "%s() takes %d positional arguments but %d were given", f.Name, max, len(args)))
9898
} else {
99-
panic(ExceptionNewf(TypeError, "%s() takes from %d to %d positional arguments but %d were given", f.Name, min, max))
99+
panic(ExceptionNewf(TypeError, "%s() takes from %d to %d positional arguments but %d were given", f.Name, min, max, len(args)))
100100
}
101101
}
102102

0 commit comments

Comments
 (0)