[Zope] dtml-in strange behavour?

mettwoch at pt.lu mettwoch at pt.lu
Mon Dec 20 15:33:11 EST 2004


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 at pt.lu


More information about the Zope mailing list