Chris Withers wrote:
> Steve Alexander wrote:
> > In PTK, PortalContent-derived classes have the method
> >
> >   def SearchableText(self):
> >       "text for indexing"
> So, if I get this correctly, Catalog will index both attributes and
> methods(that have only the self argument?) with the same name as an
> index?

I'm not sure what arguments get passed to methods by the Catalog.
You could write a class to find out. <tap tap tap> Actually, I just did

You're right. Catalog doesn't pass in any arguments, so you can use any
method that doesn't have any args without default values as an index.

> If so, then that's cool, but undocumented, which is bad...

I guess that I always assumed a Catalog would index methods as well as
simple attributes, because methods are just a particular kind of
attribute in Python.

I agree that it should be documented somewhere, though.

> > The query/predicates stuff in ZPatterns looks like it will be much
> > better than this... when it lands :-)
> I really should get into ZPatterns, is there any documentation yet?

Steve Alexander
Software Engineer
Cat-Box limited

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to