On Thu, May 23, 2013 at 12:52 PM, Matthew Gilson <m.gils...@gmail.com> 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, the previous function does not work with the > following dictionary: > > d = {1:3} > > because not all the keys are strings. Is there a way to petition to get > this more rigorously defined?
The string requirement is probably for optimization, but if the argument is both sent and received using the ** syntax, is there a good reason why only identifiers should be allowed? -- http://mail.python.org/mailman/listinfo/python-list