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:[EMAIL PROTECTED]       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to