[portland] Fwd: Need Help With a For Loop

Rich Shepard rshepard at appl-ecosys.com
Fri Mar 21 19:47:23 CET 2008


On Fri, 21 Mar 2008, Dylan Reinhardt wrote:

> Looks like I may have managed not to send this to the list.  :-)

> This makes no sense... Does row[3] change in-place after you assign to
> curComp?  Looks like you're testing the value you just set... Probably not
> what you meant to do.

Dylan,

   No, the value doesn't change. As I wrote, I dug myself into a deep rut and
cannot see over the rim to a better way of coding it all.

   Part of the missing code puts the appropriate data items in the ReportLab
structure so they're printed in a nested hierarchy. That's why the
redundancy is there.

   I've tried to construct list comprehensions to do the job, but still know
too little about them to fit them to my need. However, from what I'm
reading, they'd be the way to go because they run much faster and the data
set (in this testing sample) is > 360 tuples. In an actual situation there
may well be more data.

Rich

-- 
Richard B. Shepard, Ph.D.               |  Integrity            Credibility
Applied Ecosystem Services, Inc.        |            Innovation
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863


More information about the Portland mailing list