[Zope] Pluggable Brains

David H bluepaul at earthlink.net
Sat Aug 6 16:12:39 EDT 2005


Hi Zope,

I've been using "pluggable brains" in some zSQL classes.  I have some 
questions!

a)  It seems if I initialize a variable in the __init__ method that 
variable, say self.callCount = 1 is not retained across calls, eg

#python mod
res = context.sql.brainySQL()
for rec in res:
   rec.getCallCount()  #  where getCallCount is a method inside the 
Brains class and it just returns the var defined in __init__.  But I get 
an attribute error instead.

b) Can anyone direct me to a good faq on using these things?

c)  Has anyone experience with Pluggable Brains and zSQL?  I am 
especially interest in performance issues because I intend to use 
Pluggable Brains to do *alot* of calculations - but only if the upside 
beats the downside of using them.

d) Will Zope 3 support Pluggable Brains?

Thanks,

David



More information about the Zope mailing list