Hello Christian, Yep, I also vote for indexing None. Seems like somebody wanted to avoid the `None object is not callable` exception.
Friday, November 17, 2006, 1:22:42 PM, you wrote: > Hi, > Adam Groszer wrote: >> Hello Christian, >> >> Yep, but... >> What is the `good` behaviour regarding None values? >> Do we need to catalog them or skip them? >> >> Example: >> If the object is (user.title == None) >> Shall it be kept in the catalog or not? >> In case it is not in the catalog I won't be able to search for users >> with no title. Suggestions? >> At the moment the AttributeIndex works like this. > Ah, I didn't see that question in your original mail, so you said: > I found that z.a.catalog, AttributeIndex fails to remove the previous > value/object from the index IF the new value is None. > From this I derived that removing the value would be the right thing to > do. I didn't see the question about whether to index None or not. > IIRC the FieldIndex in Zope 2 uses None as a valid value to index and to > search for. > If I read the source and tests correctly, it's just an implementation > accident, because someone used None as a getattr() marker instead of > using a unique marker like object(). > At least there is no test and no interface description that says that > None should not be indexed. > Christian -- Best regards, Adam mailto:[EMAIL PROTECTED] -- Quote of the day: Shared joy is double joy and shared sorrow is half-sorrow. - Swedish Proverb _______________________________________________ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com