[ZPT] Re: [Zope-dev] Re: [Vote] PEP308 voting began

Shane Hathaway shane@zope.com
Thu, 06 Mar 2003 13:35:07 -0500


Steve Alexander wrote:
> 
>> (Tested with
>> <div tal:replace="if:options/x then:string:yes else:string:no">)
> 
> 
> There are an awful lot of colons in there :-)
> 
> Here's an off-the-wall idea:
> 
>   <div tal:replace="talif"
>        tal:if="options/x"
>        tal:true="string:yes"
>        tal:false="string:no"
>        >

Well, IMHO this syntax is needed primarily for tal:attributes and 
tal:define.

I was going to suggest the following variation.  A tick at the beginning 
of an expression would imply a string.

<div tal:replace="if:options/x then:'yes' else:'no'">

... then I realized it was so close to Python that it would generate 
confusion. :-)

Shane