passing *args "recursively"

Gary Duzan mgi820 at motorola.com
Mon May 12 12:38:23 EDT 2008


In article <eef8f8de-d9a5-4f3e-a24a-3632d46a52e9 at e53g2000hsa.googlegroups.com>,
Guillermo  <guillermo.listas at googlemail.com> wrote:
>
>Hi,
>
>This must be very basic, but how'd you pass the same *args several
>levels deep?
>
>
>def func2(*args)
>
>    print args # ((1, 2, 3),)
>    # i want this to output (1, 2, 3) as func1!
>    # there must be some better way than args[0]?
>
>def func1(*args):
>
>    print args # (1, 2, 3)
>    func2(args)
     func2(*args) # <<<<<<======
>
>func1(1,2,3)

					Gary Duzan
					Motorola H&NM





More information about the Python-list mailing list