Re: [Zope] page templates and "python:"

2006-07-03 Thread Lennart Regebro
On 7/3/06, Claudio Battaglino <[EMAIL PROTECTED]> wrote: Is it a significant test? Yes, for the use case of in-memory objects and methods. You might want to do the same with a traversal path nocall:context/folder1/folder2/folder3, or something, and then python:context.folder1.folder2.folder3

Re: [Zope] page templates and "python:"

2006-07-03 Thread Claudio Battaglino
Andreas Jung ha scritto: --On 3. Juli 2006 15:38:58 +0200 Claudio Battaglino <[EMAIL PROTECTED]> wrote: Jens Vagelpohl ha scritto: Could it be that, using a Python expression, I have an overhead because Zope loads a Python interpreter each time it finds a "python:"? If this is true the

Re: [Zope] page templates and "python:"

2006-07-03 Thread Lennart Regebro
On 7/3/06, Chris McDonough <[EMAIL PROTECTED]> wrote: Actually, I think python: expressions perform slightly better than their path: counterparts because their evaluation step needs to do less work (no guessing about getitem vs. getattr). Geoff Davis taught me that. But in the end it's all dwar

Re: [Zope] page templates and "python:"

2006-07-03 Thread Chris McDonough
Actually, I think python: expressions perform slightly better than their path: counterparts because their evaluation step needs to do less work (no guessing about getitem vs. getattr). Geoff Davis taught me that. But in the end it's all dwarfed by the penalty imposed by security, so it re

Re: [Zope] page templates and "python:"

2006-07-03 Thread Andreas Jung
--On 3. Juli 2006 15:38:58 +0200 Claudio Battaglino <[EMAIL PROTECTED]> wrote: Jens Vagelpohl ha scritto: Could it be that, using a Python expression, I have an overhead because Zope loads a Python interpreter each time it finds a "python:"? If this is true then it is better to use path e

Re: [Zope] page templates and "python:"

2006-07-03 Thread Claudio Battaglino
Jens Vagelpohl ha scritto: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3 Jul 2006, at 15:09, Andreas Jung wrote: ...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 expressio

Re: [Zope] page templates and "python:"

2006-07-03 Thread Jens Vagelpohl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3 Jul 2006, at 15:09, Andreas Jung wrote: ...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..

Re: [Zope] page templates and "python:"

2006-07-03 Thread Andreas Jung
--On 3. Juli 2006 15:05:36 +0200 Claudio Battaglino <[EMAIL PROTECTED]> 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 performa