Message5712

Author nriley
Recipients draghuram, nriley
Date 2010-04-15.23:06:24
SpamBayes Score 5.1747495e-13
Marked as misclassified No
Message-id <1271372785.72.0.0297617195584.issue1600@psf.upfronthosting.co.za>
In-reply-to
Content
This seems like a really bizarre edge case, perhaps not worth supporting.  
I'd argue it is a bug that CPython lets you do this with dict(), as it's not supported for ordinary Python functions.

>>> def f(**y): print y
... 
>>> f(x=3,y=7)
{'y': 7, 'x': 3}
>>> f(**{1: 3, 2: 7})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: f() keywords must be strings
>>> dict(**{1: 3, 2: 7})
{1: 3, 2: 7}
History
Date User Action Args
2010-04-15 23:06:25nrileysetmessageid: <1271372785.72.0.0297617195584.issue1600@psf.upfronthosting.co.za>
2010-04-15 23:06:25nrileysetrecipients: + nriley, draghuram
2010-04-15 23:06:25nrileylinkissue1600 messages
2010-04-15 23:06:24nrileycreate