On Wednesday, September 28, 2016 at 2:27:36 AM UTC+13, Jussi Piitulainen wrote: > Lawrence D’Oliveiro writes: >> dict(dict(d1, **d2), **d3) > > Nice expression. But that's not available if the keys are not strings: > > dict({}, **{ 1:3 }) > ==> > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > TypeError: keyword arguments must be strings > > On the other hand, '1' seemed to work (in Python 3.4.3) as key, though 1 > cannot possibly be a keyword parameter in a function definition :)
Pity. I wonder why it bothers to check? -- https://mail.python.org/mailman/listinfo/python-list