Can generate invalid code for functions with vararg
Bug #475409 reported by
Michal Kwiatkowski
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pythoscope |
Fix Released
|
Medium
|
Michal Kwiatkowski |
Bug Description
When varargs is present, all preceding arguments should be positioned, not named. Currently test generator will generate invalid code for a function like foo:
>> def foo(a, *args):
... pass
>>> foo(a=4, *(1, 2, 3))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: foo() got multiple values for keyword argument 'a'
>>> foo(a=4, 1, 2, 3)
SyntaxError: non-keyword arg after keyword arg
pythoscope.
Changed in pythoscope: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Fixed in trunk r323.