seb <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> replied:

> Organization: New Information Paradigms
> To: seb <[EMAIL PROTECTED]>
> CC: [EMAIL PROTECTED]
> 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                                [EMAIL PROTECTED]
Digital Creations     "Zope Dealers"       http://www.zope.org

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to