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
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
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
"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
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
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
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
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