[Zope-dev] Speaking of 2.6...

Ivo van der Wijk ivo@amaze.nl
Wed, 17 Apr 2002 15:27:19 +0200


On Wed, Apr 17, 2002 at 12:01:00PM +0200, Stefan H. Holek wrote:
> At 16.04.2002 15:44 -0400, Brian Lloyd wrote:
> > > I am, as the author of the dtml-set tag, of course willing to
> > > commit to the
> > > implementation of this tag for 2.6
> >
> >Ivo - I don't have a problem with the spelling of this. I _do_
> >have a problem with the fact that it (your existing release)
> >actually stores the variable in REQUEST. If it were to store them
> >somewhere more appropriate in the DTML namespace stack, I'd be
> >happy to OK it.
> 
> Hm, but the REQUEST is where we want the variables to be set! Otherwise 
> we'd use dtml-let, wouldn't we?. It is my understanding that the dtml-set 
> tag is just REQUEST.set() with sugar on it (and sweet sugar that is!). 
> Changing that semantics might (will?) break existing projects that already 
> use dtml-set (several of mine, FWIW) where the REQUEST is later passed from 
> DTML to e.g. PythonScripts...
> 
> What Ivo does is *exactly* what I want. What would "somewhere more 
> appropriate" look like? What then would be the difference to dtml-let?
> 
> I understand that REQUEST.set()/dtml-set is to be used sparingly in 
> general, but in some situations there is no alternative. And it appears to 
> be a widely used Zope(2) idiom as well.
> 

Exactly. dtml-set is just a user-friendly replacement for those horrible
<dtml-call "REQUEST.set(..)"> constructs.

I could make an optional attribute that makes the tag use the dtml namespace
in stead, though I do not know what complications that would have at this
moment.

Cheers

	Ivo

-- 
Drs. I.R. van der Wijk                              -=-
Brouwersgracht 132                      Amaze Internet Services V.O.F.
1013 HA Amsterdam, NL                               -=-
Tel: +31-20-4688336                       Linux/Web/Zope/SQL/MMBase
Fax: +31-20-4688337                           Network Solutions
Web:     http://www.amaze.nl/                    Consultancy
Email:   ivo@amaze.nl                               -=-