Comment 2 for bug 143919

Revision history for this message
Sean Upton (seanupton) wrote :

Uploaded: fix-for-2326.diff

Fix / patch attached as diff to latest svn://svn.zope.org/repos/main/Zope/trunk/lib/python/Products/ZCatalog.

Call to _seq is avoided in __init__() when adding LazyCats together, working around the way that __getitem__() is implemented. Appears to work correctly:

>>> lazy1 = LazyCat( [ [1,2] ] )
>>> lazy1 += LazyCat( [ [3,4] ])
>>> lazy1
[1, 2, 3, 4]
>>> lazy1 += LazyCat( [ [3,4] ])
>>> lazy1
[1, 2, 3, 4, 3, 4]