[Zope] tuples of length 2 in DTML
Andreas Jung
lists at andreas-jung.com
Thu Apr 14 12:32:33 EDT 2005
--On Donnerstag, 14. April 2005 12:20 Uhr -0400 Jim Abramson
<jabramson at wgen.net> wrote:
> Tuples of length 2 just don't seem to work in DTML. I don't know what
> it is, certainly never seen any documented explanation before. The
> simple test below explains itself .
>
> Can anyone explain why the results are what they are? I'd go to the
> collector if it didn't seem like such a glaringly obvious quirk. I
> figure there must be some sensible reason why this happens, but my
> manual is missing that page.
>
>
> <pre>
>
> <dtml-let tt="[('a',),('b','c',),('d','e','f')]">
> tt: <dtml-var tt>
>
> <dtml-in tt>
> tt[<dtml-var sequence-index>]: <dtml-var sequence-item>
> </dtml-in>
>
> </dtml-let>
>
> </pre>
>
This is a well-known behaviour and considered a feature for historical
reasons (don't
ask why...). Try to add the 'mapping' attribute inside dtml-in.
-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20050414/3414617c/attachment.bin
More information about the Zope
mailing list