--On 24. März 2007 10:16:46 -0400 Jonathan <[EMAIL PROTECTED]> wrote:

I have a ZCatalog and in the ZMI 'Catalog' tab it reports:


len(sRes)=  1820
cnt=  1842

The result remains the same after reindexing the whole catalog?

It looks like the __len__ method in Catalog.py is not returning the
correct value - it returns self._length() which is set by the following
method (also in Catalog.py):

    def migrate__len__(self):
        """ migration of old __len__ magic for Zope 2.8 """
        if not hasattr(self, '_length'):
            n = self.__dict__['__len__']()
            del self.__dict__['__len__']
            self._length = BTrees.Length.Length(n)

Is this migration code for pre-2.8 catalogs. This change was necessary because the new ExtensionClass implementation did not longer work
with the scary implementation of the __len__ functionality of the Catalog

If the result remains the same after reindexing the catalog there might be
an issue with the increment/decrement calls of the _length counter
with catalogObject/uncatalogObject...however no idea why...


Attachment: pgpdKpUr57W7h.pgp
Description: PGP signature

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to