On Sat, 28 Jun 2008 11:17:10 am Greg Ewing wrote: > tomer filiba wrote: > > >>> def f(**kwargs): > > > > ... print kwargs > > ... > > > > >>> f(a=5,b=7,a=8) > > > > {'a': 8, 'b': 7} > > I can't think of any reason why one would need to be > able to write such code, or even want to.
It would be nice to be able to do this: defaults = dict(a=5, b=7) f(**defaults, a=8) # override the value of a in defaults but unfortunately that gives a syntax error. Reversing the order would override the wrong value. So as Python exists now, no, it's not terribly useful. But it's not inherently a stupid idea. -- Steven _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com