20 Dec
2004
20 Dec
'04
8:33 p.m.
Hi, Could someone explain why iterating over a list of lists, like this: <dtml-in expr="[[1,1],[2,2]]"> <dtml-var sequence-item><br> </dtml-in> gives as result: [1,1] [2,2] but iterating over a list of tuples like this: <dtml-in expr="[(1,3),(2,4)]"> <dtml-var sequence-item><br> </dtml-in> gives as result 3 4 A list of tuples is created for instance when applying the items() method on a dictionary resulting from a SQL method call. When doing the above iterations in Python console, it gives the expected result eg. two lists and two tuples. Thx for any help -- Marc - a bloody Zope beginner -- mettwoch@pt.lu