[ZPT] Extending tal:condition, making metal:define

Guido van Rossum guido@digicool.com
Fri, 06 Apr 2001 15:44:13 -0500


> From: "Guido van Rossum" <guido@digicool.com>
> > Maybe, but your initial post here *wanted* an else, and you solved it
> > with two conditions, the second being the reverse of the first.  That
> > also violates the WYSIWYG principle.
> 
> I only did that because we didn't have a way to spell "leave the example
> text alone".  The lazy: proposal looks like it may be a decent spelling,
> especially if we can come up with a better name for it ;-)

I'm not sure about the semantics of "lazy:...".  I thought that it was
supposed to return None when the evaluation fails.  But that would
replace the element with nothing, not leave the default text in place
(for that, you'd have to modify TALInterpreter, I believe).

The on-error="string:default text" hack is beginning to look better...

--Guido van Rossum (home page: http://www.python.org/~guido/)