[Zope] overload __getattr__ in brains-class?

Dieter Maurer dieter@handshake.de
Sun, 21 Jul 2002 22:19:19 +0200


Jo Meder writes:
 > ... "Result" instances do not have __dict__ ...
 > > I think, it is a bug. I reported it in the mailing list and
 > > in the (old) collector.
 > 
 > At least it is very inconvenient in my current situation. Do you have an
 > url where I can look up your bug report and follow further development?
My bug report went into the old collector. And this collector (and
its content) is lost.

But, I think, there is already a new bug report (from someone else).
Search <http://collector.zope.org>.

 > > It could probably easily be changed (whether or not an Extension Class
 > > has a __dict__ or not is controlled by a flag in the corresponding
 > > type).
 > 
 > You mean I just have to change "EXTENSIONCLASS_NOINSTDICT_FLAG" to
 > "EXTENSIONCLASS_INSTDICT_FLAG", recompile and I'm set? It can't be that
 > simple, can it?
I am not sure, but I think that this is at least necessary.
It might also be necessary to modify the "getattr" method
(it probably has not this exact name) such that it looks
also in the dict (better, calls the standard function
to look up an attribute, (something like "find_attr").


Dieter