how to extract an implicit dict expression (with statement return)

Discussion in 'Python' started by Fritz Loseries, Sep 9, 2010.

  1. Hi,

    I do not know how to subject my problem in a better way.

    I have the following statement:

    return [ dict(x1 = elem.x1, x2 = elem.x2, x3 = elem.x3,)
    for elem in method(in_values)
    ]

    How can I transform it to an explicit description:

    result = ...
    return result

    Could not found a description for the here used form of for and what
    [...] means.

    Need this for debugging.
    Thanks for any help.

    Regards,

    Fritz
    Fritz Loseries, Sep 9, 2010
    #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. Skip Montanaro
    Replies:
    0
    Views:
    403
    Skip Montanaro
    Aug 15, 2003
  2. Alexander Kozlovsky

    dict!ident as equivalent of dict["ident"]

    Alexander Kozlovsky, May 21, 2006, in forum: Python
    Replies:
    5
    Views:
    346
    Alexander Kozlovsky
    May 22, 2006
  3. Paul Melis

    dict.has_key(x) versus 'x in dict'

    Paul Melis, Dec 6, 2006, in forum: Python
    Replies:
    48
    Views:
    1,300
    Kent Johnson
    Dec 15, 2006
  4. Almad
    Replies:
    8
    Views:
    387
    Terry Reedy
    Dec 14, 2006
  5. Drew
    Replies:
    19
    Views:
    1,328
    Duncan Booth
    Mar 15, 2007
Loading...

Share This Page