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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4