[Zope-dev] Catalog result brains not extendable
Chris McDonough
chrism@digicool.com
Mon, 30 Jul 2001 19:11:46 -0400
There's no ban for attributes other than __setattr__ and __setitem__.
The Zope security machinery is built largely around these two methods
plus __getattr__ and __getitem__.
I would likely use an external method or perhaps Evan's XXXPythonScripts
that don't have restrictions against doing __setattr__.
- C
"Jay, Dylan" wrote:
>
> I'm trying to get some results from a catalog and add meta_data to it.
> It seems the only way I can do this using python scripts is by turning the
> each result object into a dictionary and then adding to that. This is due to
> the fact that you can't do a setattr on anything using a python script. Why
> not? Obviously for security reasons but surely there must be a less
> restrictive alternative than a blanket ban on using attributes on classes?
>
> _______________________________________________
> Zope-Dev maillist - Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope )
--
Chris McDonough Zope Corporation
http://www.zope.org http://www.zope.com
"Killing hundreds of birds with thousands of stones"