[Zope3-dev] possible bug in catalog code
Jim Fulton
jim at zope.com
Thu Jul 7 07:13:17 EDT 2005
Martijn Faassen wrote:
> Jim Fulton wrote:
> [snip]
>
>> It would only be safe to use None as a BTree key if all of the keys used
>> were None, which wouldn't be very interesting. :)
>
>
> It'd also make sense if you didn't do a range query, right? I.e. you're
> just looking for (None, None). I realize though that queries with None
> do something else entirely, as they open the range.
Any lookup in a BTree is a range query -- it depends on orderability
of the keys.
> Anyway, perhaps a comment should be in place specifying that None cannot
> be indexed; this way it just looked surprising.
Sure. There should probably be a note that all of the keys *must*
be orderable in a way that is consistent accross processes and Python
versons. This is a far more likely gotcha.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Zope3-dev
mailing list