Roy Smith wrote:
> I just re-read the documentation on the dict() constructor. Why does it
> support keyword arguments?
>
> dict(foo="bar", baz="blah") ==> {"foo":"bar", "baz"="blah"}
>
> This smacks of creeping featurism. Is this actually useful in real code?
Personally, I use it all the time. It's a much more convenient literal
for a dictionary. And before it was introduced I used this utility function:
def mkdict(**kwargs):
return kwargs
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list