Re: Non-identifiers in dictionary keys for **expression syntax

2013-05-23 Thread Matthew Gilson
On 05/23/2013 04:52 PM, Terry Jan Reedy wrote: On 5/23/2013 2:52 PM, Matthew Gilson wrote: This is a question regarding the documentation around dictionary unpacking. The documentation for the call syntax (http://docs.python.org/3/reference/expressions.html#grammar-token-call) says: "If the s

Re: Non-identifiers in dictionary keys for **expression syntax

2013-05-23 Thread Matthew Gilson
On 05/23/2013 03:20 PM, Neil Cerutti wrote: On 2013-05-23, Matthew Gilson wrote: That's fine, but what is a keyword argument? According to the glossary (http://docs.python.org/3.3/glossary.html): /"keyword argument/: an argument preceded by an identifier (e.g. name=) in a function call or pa

Re: Non-identifiers in dictionary keys for **expression syntax

2013-05-23 Thread Terry Jan Reedy
On 5/23/2013 2:52 PM, Matthew Gilson wrote: This is a question regarding the documentation around dictionary unpacking. The documentation for the call syntax (http://docs.python.org/3/reference/expressions.html#grammar-token-call) says: "If the syntax **expression appears in the function call,

Re: Non-identifiers in dictionary keys for **expression syntax

2013-05-23 Thread Ian Kelly
On Thu, May 23, 2013 at 12:52 PM, Matthew Gilson wrote: > Using Cpython, we can do the following: > > def func(**kwargs): > print kwargs > > d = {'foo bar baz':3} > > So that might lead us to believe that the keys of the mapping do not need to > be valid identifiers. However,

Re: Non-identifiers in dictionary keys for **expression syntax

2013-05-23 Thread Ethan Furman
On 05/23/2013 12:20 PM, Neil Cerutti wrote: On 2013-05-23, Matthew Gilson wrote: That's fine, but what is a keyword argument? According to the glossary (http://docs.python.org/3.3/glossary.html): /"keyword argument/: an argument preceded by an identifier (e.g. name=) in a function call or pa

Re: Non-identifiers in dictionary keys for **expression syntax

2013-05-23 Thread Neil Cerutti
On 2013-05-23, Matthew Gilson wrote: > That's fine, but what is a keyword argument? According to the glossary > (http://docs.python.org/3.3/glossary.html): > > /"keyword argument/: an argument preceded by an identifier (e.g. name=) > in a function call or passed as a value in a dictionary prece

Non-identifiers in dictionary keys for **expression syntax

2013-05-23 Thread Matthew Gilson
This is a question regarding the documentation around dictionary unpacking. The documentation for the call syntax (http://docs.python.org/3/reference/expressions.html#grammar-token-call) says: "If the syntax **expression appears in the function call, expression must evaluate to a mapping, th