[Zope] page templates and "python:"

Andreas Jung lists at zopyx.com
Mon Jul 3 09:09:32 EDT 2006



--On 3. Juli 2006 15:05:36 +0200 Claudio Battaglino 
<c.battaglino at metaware.it> wrote:

> Hi,
> what does exactly happen when I use "python:" into a zpt?
> Is it a problem if I have many "python:" in my page templates?
> What are the differences in performances of these two definitions?

Talking of performance...you might write a benchmark to figure it out...
no idea
>
> <metal:block tal:define="my_value my_object/getValue">...</metal:block>
>
> <metal:block tal:define="my_value
> python:my_object.getValue()">...</metal:block>
>

The main difference between both variants is that in path expressions 
getValue can be either an attribute or a method...so at least path 
expressions may have some overhead...you have to measure it.

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20060703/6817126a/attachment.bin


More information about the Zope mailing list