Re: Comma is not always OK in the argument list?!

2006-07-29 Thread Nick Vatamaniuc
Dennis, You make a good point, that is what I though first. Semantically I thought a comma after **kw as in ..., **kw,) doesn't make sense because there is nothing that could follow **kw except the ')'. But then trying some other cases (see the previous posts for my examples) I noticed that commas

Re: Comma is not always OK in the argument list?!

2006-07-29 Thread Nick Vatamaniuc
Roman, The way I see it, it could be either way. In other words if I can write f(1,2,3) and f(1,2,3,) I should also be able to write f(1,*[2,3],). It is a really small detail but there sould be some consistency. Either no extra commas for all kinds of argument types or extra commas for _all_ of t

Re: Comma is not always OK in the argument list?!

2006-07-29 Thread Roman Susi
Nick Vatamaniuc wrote: >True, that is why it behaves the way it does, but which way is the >correct way? i.e. does the code need updating or the documentation? > > > Perhaps, someone can make a bug report... IMHO, docs are wrong. -Roman >-Nick V. > >[EMAIL PROTECTED] wrote: > > >>Nick Vatama

Re: Comma is not always OK in the argument list?!

2006-07-28 Thread Terry Reedy
"Nick Vatamaniuc" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > True, that is why it behaves the way it does, but which way is the > correct way? i.e. does the code need updating or the documentation? I think the doc. -- http://mail.python.org/mailman/listinfo/python-list

Re: Comma is not always OK in the argument list?!

2006-07-28 Thread Nick Vatamaniuc
True, that is why it behaves the way it does, but which way is the correct way? i.e. does the code need updating or the documentation? -Nick V. [EMAIL PROTECTED] wrote: > Nick Vatamaniuc wrote: > > Roman, > > > > According to the Python call syntax definition > > (http://docs.python.org/ref/calls

Re: Comma is not always OK in the argument list?!

2006-07-28 Thread olsongt
Nick Vatamaniuc wrote: > Roman, > > According to the Python call syntax definition > (http://docs.python.org/ref/calls.html) commas should be allowed, so it > seems like a minor bug. Here are the lines in question: > -http://docs.python.org/ref/calls.html--- > call ::= primary "(" [a

Re: Comma is not always OK in the argument list?!

2006-07-28 Thread Nick Vatamaniuc
Roman, According to the Python call syntax definition (http://docs.python.org/ref/calls.html) commas should be allowed, so it seems like a minor bug. Here are the lines in question: -http://docs.python.org/ref/calls.html--- call ::= primary "(" [argument_list [","]] ")" argument_list

Comma is not always OK in the argument list?!

2006-07-28 Thread Roman Susi
Hi! it is interesting that I found this syntax error: >>> a = {} >>> str('sdfd', **a,) File "", line 1 str('sdfd', **a,) ^ SyntaxError: invalid syntax I just wonder is it intentional or by-product (bug or feature)? (The behaviour makes sense, of course... I tend to leav