Message29380
This behavior seems as intended. According to the docs (http://docs.python.org/ref/calls.html):
A trailing comma may be present after the positional and keyword arguments but does not affect the semantics.
[snip]
Formal parameters using the syntax "*identifier" or "**identifier" cannot be used as positional argument slots or as keyword argument names.
I'm having trouble with what this actually means. However, the relevant section in the Grammar looks like this:
arglist: (argument ',')* (argument [',']| '*' test [',' '**' test] | '**' test )
It looks like this logic was explicitly coded.
If this is determined to be a bug, we can just add [','] after the test in both cases. |
|
Date |
User |
Action |
Args |
2007-08-23 14:41:43 | admin | link | issue1531016 messages |
2007-08-23 14:41:43 | admin | create | |
|