[Zope] overload __getattr__ in brains-class?

Jo Meder jo@meder.de
Thu, 18 Jul 2002 17:00:25 +0200

Situation: I'm developing a product where some attributes come from
one bunch of SQL-tables and some additional info is obtained by other

The idea was to create a brain-class and overwrite __getattr__ to return
the correct values from the different sources according to what key the
application asked for.

The objects are created (just like in DA.py) via 


Now whatever I try, either some other __getattr__ seems to be called
since I can get none of my "simulated" attributes to show up. 

Is it at all possible to do what I want to? Did I take a wrong turn
somewhere way back? 

Any hints are appreciated.


Internetmanufaktur Jo Meder ---------------------- Berlin, Germany
http://www.meder.de/ ------------------- fon: ++49-30-417 17 63 33
Kollwitzstr. 75 ------------------------ fax: ++49-30-417 17 63 45
10435 Berlin --------------------------- mob: ++49-170- 2 98 89 97
Public GnuPG-Key ---------- http://www.meder.de/keys/jo-pubkey.txt