method (a, b = '', *c, **d): gets a syntax error?

Michael Peuser mpeuser at web.de
Fri Aug 29 13:41:50 EDT 2003


"Terry Reedy" <tjreedy at udel.edu> schrieb im Newsbeitrag
news:3dqcndZe5u2g4NKiXTWJiA at comcast.com...

[...}
>
> 1. When you make a function call and use **whatever, it must be the
> last item in the argument list, just as in a function definition.   A
> following comma is not allowed for either defs or calls.

This in fact is not true. Funnily you can add *one* comma at the end of any
list-like construct. I have not digged into documentation to find out where
this is described (or whether it is an unnoticed "bug"). I consider this a
"good thing" however, because it eases editing when you put your items on
single rows. In this case the comma is more a "terminator" than a
"separator"

Kindly
Michael






More information about the Python-list mailing list