Optional assignments ?

Discussion in 'Python' started by Madhusudan Singh, Aug 7, 2005.

  1. Hi

    Is it possible to have something like :

    a,b,c,d=fn(that returns 10 return values) ?
     
    Madhusudan Singh, Aug 7, 2005
    #1
    1. Advertising

  2. Madhusudan Singh

    Robert Kern Guest

    Madhusudan Singh wrote:
    > Hi
    >
    > Is it possible to have something like :
    >
    > a,b,c,d=fn(that returns 10 return values) ?


    a,b,c,d = fn()[:4]

    --
    Robert Kern


    "In the fields of hell where the grass grows high
    Are the graves of dreams allowed to die."
    -- Richard Harter
     
    Robert Kern, Aug 7, 2005
    #2
    1. Advertising

  3. Robert Kern wrote:

    > Madhusudan Singh wrote:
    >> Hi
    >>
    >> Is it possible to have something like :
    >>
    >> a,b,c,d=fn(that returns 10 return values) ?

    >
    > a,b,c,d = fn()[:4]
    >

    Thanks !
     
    Madhusudan Singh, Aug 7, 2005
    #3
    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. Neil Zanella
    Replies:
    2
    Views:
    986
    Neil Zanella
    Oct 26, 2003
  2. Nicolas Matringe
    Replies:
    9
    Views:
    728
    Mike Treseler
    Jun 14, 2004
  3. Gary Thorpe

    Using aggregates for assignments

    Gary Thorpe, Jun 14, 2004, in forum: VHDL
    Replies:
    4
    Views:
    697
  4. ALuPin

    Back-Annotate Assignments

    ALuPin, Oct 20, 2004, in forum: VHDL
    Replies:
    1
    Views:
    1,792
    Ben Twijnstra
    Oct 20, 2004
  5. Alex Rast
    Replies:
    3
    Views:
    663
Loading...

Share This Page