[Zope] sequence-item is called in dtml-let assignment?
Tres Seaver
tseaver@digicool.com
Thu, 28 Sep 2000 17:06:17 -0400
seb <sebbacon@email.com> asked:
> Ahh, now I understand...
>
> > If you do <dtml-var "_['sequence-item']">, it'll get called (real bitch
> > of mine, that one :-( )
> > And, apparently, if you do <dtml-let thing=sequence-item>, it'll get
> > called....
>
> Are the above two points bugs, then? Or is there a legitimate reason
> for this behaviour?
Chris Withers <chrisw@nipltd.com> replied:
> Organization: New Information Paradigms
> To: seb <sebbacon@email.com>
> CC: zope@zope.org
> Subject: Re: [Zope] sequence-item is called in dtml-let assignment?
>
> seb wrote:
> >
> > Ahh, now I understand...
> >
> > > If you do <dtml-var "_['sequence-item']">, it'll get called (real bitch
> > > of mine, that one :-( )
> > > And, apparently, if you do <dtml-let thing=sequence-item>, it'll get
> > > called....
> >
> > Are the above two points bugs, then?
>
> Probably not...
>
> > Or is there a legitimate reason
> > for this behaviour?
>
> illegitimate in that it makes some things easier, like showing an object
> when you don't know whether it's a function or a string (as with id, as
> ChrisM pointed out ;-) but bastardising python syntax to your own ends
> is probably a bad thing :-S
First, let me apologize for sending seb off on a wild goose chase;
Chris has correctly explained the "eagerness" with which DTML attempts
to render objects, particularly those acquired by name. This behavior
is targeted directly at DTML's original purpose, which was to generate
HTML reports against the objects published by Bobo/Zope; the
interoduction
of more powerful programming constructs (the let tag, expression syntax)
have not always jived well with the more ancient core of DTML.
Tres.
--
===============================================================
Tres Seaver tseaver@digicool.com
Digital Creations "Zope Dealers" http://www.zope.org