Does this help? def foobar(first_name,last_name, *args, **kwargs): print first_name print last_name print "Tuple:",args print "Dict:",kwargs
x = "has" y = "demonstrated" foobar('Shane','Geiger', x, y, adjective='useful', thing='PYTHON trick known as extended call syntax', adverb='wonderfully') [EMAIL PROTECTED] wrote: > I've been reading the following example, and couldn't figure out, what > **kw mean. (It's an empty dictionary, but what's the semantics): > > > def wrap(method): > def wrapped(self, *args, **kw): > print "begin" > method(self, *args, **kw) > print "end" > return wrapped > > > class Test(object): > def method(self, name): > print "method(%r)" % name > > t = Test() > t.method("pure") > Test.method = wrap(Test.method) > t.method("wrapped") > > -- Shane Geiger IT Director National Council on Economic Education [EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net Leading the Campaign for Economic and Financial Literacy -- http://mail.python.org/mailman/listinfo/python-list