Roy Smith <r...@panix.com> writes: > When something goes amiss and I want to debug the problem, I often > transform that into: > > temp = [Foo(x) for x in bunch_of_x_thingies] > logger.debug(temp) > return temp > > It would be convenient to be able to get at and log the intermediate > value without having to pull it out to an explicit temporary.
What's wrong with that though? You're not “pulling it out to” anything; you're binding a name to the value in order to do several things with it. Exactly what you say you want to do. It's explicit and clear. -- \ “What we usually pray to God is not that His will be done, but | `\ that He approve ours.” —Helga Bergold Gross | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list