mò &á¸Ec@sRdZdklZlZeƒZdefd„ƒYZdefd„ƒYZdS(s5Lazy expression handler A lazy expressions is implemented similarly to the defer expression but has a different result. While a defer expression is evaluated every time it is used according to its context a lazy expression is evaluted only the first time it is used. Lazy expression are known under the name lazy initialization of variables, too. A common use case for a lazy expression is a lazy binding of a costly expression. While one could call an expression only when it's required it makes sense to define it only one time when it could be used multiple times. Example
...
(s DeferWrappers DeferExprt LazyWrappercBs tZdZd„Zd„ZRS(s!Wrapper for lazy: expression cCs ti|||ƒt|_dS(N(t DeferWrappert__init__tselftexprtecontextt_markert_result(RRR((t?/data/zmath/zope/lib/python/Products/PageTemplates/DeferExpr.pyR)scCs7|i}|tjo|i|iƒ|_}n|S(N(RRtrRt_exprt _econtext(RR ((Rt__call__-s  (t__name__t __module__t__doc__RR (((RR&s  tLazyExprcBs tZdZd„Zd„ZRS(sDlazy: expression handler for lazy initialization of expressions cCst|i|ƒS(N(RRt_cR(RR((RR 6scCs d|i S(Nslazy:%s(Rt_s(R((Rt__repr__9s(R RRR R(((RR3s  N(Rtzope.tales.expressionsRt DeferExprtobjectRRR(RRRRR((Rt?s