mň řÔ5;c@sDdZdkZdkTdklZyeWnej on!Xdfd„ƒYZeeƒZydkl Z Wnd„Z nXdfd „ƒYZ d fd „ƒYZ e e ƒd e fd „ƒYZ e e ƒde fd„ƒYZ e e ƒe Zdfd„ƒYZde fd„ƒYZe eƒdfd„ƒYZdS(s3 Python part of the Proxy type implementation. Copyright (c) 2000, Marc-Andre Lemburg; mailto:mal@lemburg.com Copyright (c) 2000-2001, eGenix.com Software GmbH; mailto:info@egenix.com See the documentation for further information on copyrights, or contact the author. All Rights Reserved. N(t*(s __version__t_ModuleFinalizationcBstZd„Zd„ZRS(NcCs ||_dS(N(tfunctiontselftfini(RR((t9/data/zmath/lib/python2.4/site-packages/mx/Proxy/Proxy.pyt__init__scCs|iƒdS(N(RR(R((Rt__del__s(t__name__t __module__RR(((RRs (sfreezecCs|S(N(tx(R ((Rtst ProxyFactorycBs,tZdZed„Zd„Zd„ZRS(sE Factory for producing Proxy-wrapped objects of a class. cCs||_||_dS(N(tClassRt interface(RR R((RR&s cOstt|i||ƒ|iƒS(sH Return a new (wrapped) object. Pass-objects are not supported. N(tProxytapplyRR targstkwR(RRR((Rt__call__+scCsdt|iƒS(Ns(treprRR (R((Rt__repr__1s(RR t__doc__tNoneRRR(((RR !s   t InstanceProxycBs;tZdZeeed„Zd„Zd„Zd„ZRS(s6 Proxy that wraps Python instances transparently. cCsW|i}||||ƒ}|i|d<|i |d<|i i d|i i |d(RR"R RRtid(R((RRGscCs |i|ƒS(N(RRtwhat(RR$((Rt __getattr__TscCs|i||ƒdS(N(RRR$tto(RR$R&((Rt __setattr__Ws( RR RRRRRR%R'(((RR5s  tCachingInstanceProxycBs tZdZd„Zd„ZRS(sQ Proxy that wraps Python instances transparently and caches accessed attributes and methods. Note that cached attributes are not looked up in the wrapped instance after the first lookup -- if their value changes, this won't be noticed by objects that access the object through this wrapper. cCs|i|ƒ|i|<}|S(N(RRR$Rto(RR$R)((RR%gscCs5|i||ƒ|ii|ƒo|i|=ndS(N(RRR$R&Rthas_key(RR$R&((RR'ls(RR RR%R'(((RR(\s  tSelectiveCachingInstanceProxycBs#tZdZeifZd„ZRS(s Proxy that wraps Python instances transparently and caches accessed attributes and methods depending on their type. Cached types are set via the attribute proxy_cacheable_types. It defaults to caching only methods (which likely don't change). cCs:|i|ƒ}t|ƒ|ijo||i|(RRR (R((RRœs(RR RRRRR(((RR0Œs   tReadonlyInstanceProxycBs)tZdZeeed„Zd„ZRS(sR Proxy that wraps Python instances transparently in a read-only way. cCsJ|i}||||ƒ}|i|d<|i i d|i i |d