Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > how to extract an implicit dict expression (with statement return)

Thread Tools

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

Fritz Loseries
Posts: n/a

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.



Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
dict.has_key(x) versus 'x in dict' Paul Melis Python 48 12-15-2006 05:55 PM
Inconsistency in dictionary behaviour: dict(dict) not calling __setitem__ Almad Python 8 12-14-2006 07:37 PM
dict!ident as equivalent of dict["ident"] Alexander Kozlovsky Python 5 05-22-2006 08:06 AM
Re: dict->XML->dict? Or, passing small hashes through text? Skip Montanaro Python 0 08-15-2003 03:46 PM