[Zope] PluggableBrains weirdness

Jim Kutter jim at ebizq.net
Mon Jul 26 10:20:14 EDT 2004


What I do in this case is put bogus fields into the record object

Select a, b, '' as new_field1, '' as new_field2 from table where yada
yada

The new_field1 and new_field2 are then members of the object I can do
what I want with, even re-cast them as new types. I frequently do this
to create lists inside the record object.

-jim

-----Original Message-----
From: Michael Ekstrand [mailto:michael-zope at elehack.net] 
Sent: Monday, July 26, 2004 8:32 AM
To: zope at zope.org
Subject: Re: [Zope] PluggableBrains weirdness


On Sunday 25 July 2004 17:12, Dieter Maurer wrote:
> A well known (extremely old collector entry) misfeature of
> the "record" class used to implement Z SQL Method result rows:
> their instances do not have a "__dict__" and therefore cannot
> store attributes other than the result fields.

Hmm... is there a way I can bypass this? Creatively, perhaps? My class 
is implementing some data validation functions, and needs to have a few 
instance variables to keep track of its internal state.

A few things are coming to mind - is there something I can do with a an 
inner class, a global dictionary, or something like that?

Thanks,
Michael
_______________________________________________
Zope maillist  -  Zope at zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

271 North Avenue
Suite 1210
New Rochelle, NY 10801

ebizQ Links
Webinars  http://www.ebizq.net/webinars/?campaign=exchange
White Papers http://www.ebizq.net/white_papers/?campaign=exchange




More information about the Zope mailing list