Marco Wahl wrote: >>Marco Wahl enlightened us with: >> >>>>>>foo(t) >>> >>> Traceback (most recent call last): >>> File "<stdin>", line 1, in ? >>> TypeError: foo() takes exactly 2 arguments (1 given) >> >>Call foo(*t) > > > Thank you very much Luke Plant, Steven D'Aprano and Sybren Stuvel. > > This was exactly what I was looking for. I'm happy now. ;-) FWIW, there's something similar for dicts and named args:
>>> def foo(a, b): print str(a), str(b) ... >>> kwargs = {'a' : 1, 'b': 2} >>> foo(**kwargs) 1 2 >>> -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.python.org/mailman/listinfo/python-list