[Zope-dev] Returning lists of Tuples from External Methods

David S. Harrison dsh@magma-da.com
Mon, 08 Nov 1999 14:48:03 -0800


Something special seems to happen if I return a list of two-element
tuples from an external method.  If I return a list of three-element
tuples, Zope does what I expect.  It allows me to sequence through
each tuple in the list using <dtml-in> and then I use
<dtml-var "_['sequence-item'][0]"> <dtml-var "_['sequence-item'][1]">
and <dtml-var "_['sequence-item'][2]"> to access elements of the tuple.

But if I return
a two element tuple, I get a list of the second element of the tuple
when I use <dtml-in>.  I suspect Zope is doing something like
interpreting the tuple list as name/value pairs and adding them
to the namespace.  But I haven't found any documentation on it.
Any clues on what is happening here?

			David S. Harrison
			(dsh@magma-da.com)