[Zope] Re: adding a custom attribute to a mybrain object

Huron huron at sopinspace.com
Thu Jan 5 01:50:33 EST 2006


Hi Florent, and thanks for your reply ...

debugging those brains objects, I've seen that there is (so to say) a double
indirection to store attributes, involving this __record_schema__ you're
talking about :

>>> myBrain.__record_schema__['mynewatttribute']=35
>>> myBrain[35]='my_new_value'
>>> myBrain.mynewatttribute
'my_new_value'

        This seems to work, as long as the new attribute name does not collide with
a metadata name or with an existing metadata index (35 in my example) ...

--
huron



More information about the Zope mailing list