Why is "unpacking" of tuples only allowed when there's 1 tupple ?

Discussion in 'Python' started by Stef Mientki, Aug 15, 2009.

  1. Stef Mientki

    Stef Mientki Guest

    hello,

    I'm not sure if "unpacking" is the right term
    but if I have a tuple of 2 arrays,
    I can either call a function with:

    Space_State = tf2ss ( filt[0], filt[1] )

    or with
    Space_State = tf2ss ( *filt )

    Now if I've to call a function with more parameters,
    why can't I use (Polynome is again a tuple of 2 arrays) :
    (which already gives an error in the IDE)

    Respons = signal.lfilter ( *Polynome, Signal )

    and thus I've to use:

    Respons = signal.lfilter ( Polynome[0], Polynome[1], Signal )


    I use Python 2.5.2

    thanks,
    Stef Mientki
     
    Stef Mientki, Aug 15, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,030
    Smokey Grindel
    Dec 2, 2006
  2. Stef Mientki
    Replies:
    0
    Views:
    1,078
    Stef Mientki
    Aug 15, 2009
  3. Ross
    Replies:
    15
    Views:
    678
    Vlastimil Brom
    Sep 22, 2009
  4. joblack
    Replies:
    2
    Views:
    579
  5. Jon Reyes
    Replies:
    18
    Views:
    240
    Mitya Sirenef
    Feb 19, 2013
Loading...

Share This Page