[Zope] change variable
Ed Leafe
ed@leafe.com
Tue, 23 Jul 2002 12:52:04 -0400
On Tuesday, July 23, 2002, at 12:45 PM, Charlie Reiman wrote:
> Uh, dtml-let is NOT equivalent to REQUEST.set. This is not an either/or
> decision here. dtml-let is a namespace operator, much like Lisp's
> (let ...)
> operator. Unforunately, most people assume let is like BASIC's let,
> which is
> assignment, not namespace creation.
>
> To put it another way, DTML does not prevent you from assigning values
> to
> variables, but it does nothing to make it easy (like providing syntax).
> I've
> always wondered if there was a design decision behind this or just a
> simple
> oversight.
Well, in my case, I am taking values from a form, cleaning them up
(removing punctuation from phone numbers, etc.), and then updating a
database with these 'processed' values. I changed one of my methods from
dtml-let to REQUEST.set, and it worked perfectly while becoming much,
much cleaner. So while the two may not be equivalent, they both do what
I need, and REQUEST.set is far superior for this.
___/
/
__/
/
____/
Ed Leafe
http://leafe.com/
http://foxcentral.net