[Zope-dev] New method for ZCatalog: recatalog_object

R. David Murray bitz@bitdance.com
Sun, 27 Aug 2000 15:39:36 -0400 (EDT)


> ZCatalog would be easier to use if it had a recatalog_object method:
> 
>     def recatalog_object(self, obj, uid):
>         """Adds object to the catalog if not already present.
>         Removes old entry first, if already in present."""
>         self.uncatalog_object(uid)
>         self.catalog_object(obj, uid)
[...]
> Any comments?

Well, from the fact that in CatalogAwareness.py the method "reindex_object",
which essentially does the equivalent of what you want but for CatalogAware
objects, is prefaced by the comment "Suprisingly useful", I'd say
you are on the right track...

--RDM