Martijn Faassen wrote:
Jim Fulton wrote:

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 Fulton           mailto:[EMAIL PROTECTED]       Python Powered!
CTO                  (540) 361-1714  
Zope Corporation
Zope3-dev mailing list

Reply via email to