[Zope] TALES expression

Tino Wildenhain tino at wildenhain.de
Wed Jul 16 07:39:15 EDT 2008


Fred Drake wrote:
> On Wed, Jul 16, 2008 at 6:34 AM, Tino Wildenhain <tino at wildenhain.de> wrote:
>> You should check the tales documentation. the pipe symbol |
>> means a logical "or", in effect if the left expression resolves
>> to "non existent", None, empty object,... (generally python False)
>> the right part of it is evaluated.
> 
> Not at all.
> 
> The pipe uses the left-hand operand if it is defined; a value of None
> or an empty string is still a defined value.  As long as "here" can be
> traversed with the name "getDataInici" then the left-hand expression
> will be used.  If that traversal fails the right-hand expression will
> be used instead.

Indeed :-)

Cheers
Tino
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3241 bytes
Desc: S/MIME Cryptographic Signature
Url : http://mail.zope.org/pipermail/zope/attachments/20080716/f5a61572/smime.bin


More information about the Zope mailing list