Message414038
With two exceptions, nice suggestions if feasible.
>>> def foo(*args=None): pass
SyntaxError: * argument cannot have default value
>>> def foo(**kwargs=None): pass
SyntaxError: ** argument cannot have default value
Good.
>>> foo(*args=[0])
SyntaxError: cannot assign to iterable argument unpacking
>>> foo(**args={"a": None})
SyntaxError: cannot assign to keyword argument unpacking
Incomprehensible. It seems to me that these should have same message as first two; message should not depend on proposed default. |
|
Date |
User |
Action |
Args |
2022-02-25 20:45:07 | terry.reedy | set | recipients:
+ terry.reedy, lys.nikolaou, pablogsal, Andy_kl |
2022-02-25 20:45:07 | terry.reedy | set | messageid: <1645821907.9.0.822217656433.issue46838@roundup.psfhosted.org> |
2022-02-25 20:45:07 | terry.reedy | link | issue46838 messages |
2022-02-25 20:45:07 | terry.reedy | create | |
|