[Zope-Coders] ZCTextIndex too sensitive

Casey Duncan casey@zope.com
Thu, 12 Jun 2003 15:49:09 -0400


On Thursday 12 June 2003 02:57 pm, Sidnei da Silva wrote:
> On Thu, Jun 12, 2003 at 01:59:07PM -0400, Casey Duncan wrote:
> | > So, how come 'text' is callable but doesnt have __call__? Weird.=20
> |=20
> | It must be trying to index an ExtensionClass instance.=20
> | callable(ExtensionClass instance) always returns true 8^(
>=20
> Thats what it looks like to me.
>=20
> | > Now my question: How do we fix this?=20
> | >=20
> | >  a. Putting a try/except
> | >  b. Using 'safe_callable'
> | >  c. ???
> |=20
> | I might suggest using safe_callable, except it would add a dependency=
 to=20
> | DocumentTemplate, which feels very wrong to me.=20
>=20
> Just on the start of ZCatalog/Catalog.py there is a try/except that def=
ines=20
a
> pythonic version of safe_callable if DocumentTemplate can't be fine,
> so I guess that ZCTextIndex depending on ZCatalog is fine? If yes, Ill
> just use that.

This seems reasonable to me.

-Casey