"Steve Bergman" <[EMAIL PROTECTED]> writes:

> <p py:for="dataset, time in datasets, times">
>     <div py:content="form.display(dataset)">form</div>
>     Total Time: ${time}
> </p>

You can't do that.  You can, OTOH, zip() datasets and times together to use
just one loop.  But here, dataset will get datasets[0] and time will get
datasets[1] (in the first run, add 1 to each index for sucessive runs).

> Sorry if this is a basic python question , but I thought I understood
> unpacking pretty well and this is just not working as I expected and
> I'm not sure why.

It is basic python, indeed.

You can always try the interactive interpreter:


In [12]: a_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

In [13]: b_list = [11, 12, 13, 14, 15, 16, 17, 18, 19, 20]

In [14]: combined = zip(a_list, b_list)

In [15]: for one, two in combined:
   ....:     print "ONE:", one
   ....:     print "TWO:", two
   ....:     
ONE: 1
TWO: 11
ONE: 2
TWO: 12
ONE: 3
TWO: 13
ONE: 4
TWO: 14
ONE: 5
TWO: 15
ONE: 6
TWO: 16
ONE: 7
TWO: 17
ONE: 8
TWO: 18
ONE: 9
TWO: 19
ONE: 10
TWO: 20

In [16]: 


-- 
Jorge Godoy      <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to