In article <mailman.3739.1324057724.27778.python-l...@python.org>, Nathan Rice <nathan.alexander.r...@gmail.com> wrote:
> I'd like to hear people's thoughts on the subject. Currently we are > throwing away useful information in many cases that could be used for > code analysis, optimization and simpler interfaces. Most of this was TL:DNR, but I will admit I often wish for a better way to log intermediate values. For example, a common pattern in the code I'm working with now is functions that end in: return [Foo(x) for x in bunch_of_x_thingies] 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. -- http://mail.python.org/mailman/listinfo/python-list