[Zope] PluggableBrains weirdness

Michael Ekstrand michael-zope at elehack.net
Fri Jul 23 14:54:12 EDT 2004


Another question about these PluggableBrains I'm developing for my 
application.

I haven't been able to find much definitive, complete documentation on 
the subject anywhere. So I'm pretty much figuring it out by trial-and 
error.

My class has an __init__ method like so:

    def __init__(self):
        "Initialize class"
        self._badmsgs = {}   # function: reason
        # Validation info...
        self._invalidated = False    # Have we been specifically 
invalidated by a set function?
        self._valid = True           # Are we valid?

When I access a query using this Brains class, I get an AttributeError 
complaining about _badmsgs. What is causing this? It occurs even if I 
declare
_badmsgs = {}

outside the __init__ function.


More information about the Zope mailing list