[Zope] overload __getattr__ in brains-class?

Dan L. Pierson dan@control.com
Mon, 22 Jul 2002 13:13:29 -0400


--On Monday, July 22, 2002 07:57:36 AM +0200 Jo Meder <jo@meder.de> wrote:

> Yes, sure. But I wanted it to get called because my getattr was to add
> some attributes from another source.

If what you want to do is add a small fixed number of other attributes
to the result of a ZSQL query (sorry, I missed your initial question),
Jim Fulton gave me the simplest solution at the last IPC:  just return
the additional attributes as null values, e.g.:

  SELECT name, NULL as address, NULL as phone FROM ...;

It's a kludge, but it beats the convolutions I was going through trying
to hack around the Record class limits.

Dan Pierson