elegante zuweisung gesucht

Gerhard Haering gh at ghaering.de
Fri Nov 19 10:08:12 EST 2004


On Fri, Nov 19, 2004 at 04:03:10PM +0100, Benny Mohr wrote:
> Hallo ihr Cracks,
> 
> ich habe eine einfache Funktion
> 
> def myFunc(a,b):
>     pass
> 
> und eine Liste
> 
> myList = [1,2]
> 
> und möchte gerne auf diese Weise aufrufen:
> 
> myFunc(myList)
> 
> Geht leider nicht - gibt es Alternativen ohne myFunc zu ändern?

myFunc(*myList)

Btw. English is the preferred language on this list. If, however, you
want to talk about Python in German, then this is the list for it
python-de mailing list: http://python.net/mailman/listinfo/python-de

Good luck in your Python course :-P

-- Gerhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20041119/8621a8a9/attachment.sig>


More information about the Python-list mailing list