Re: Migrating to BTrees 4.x
Jason Madden <[email protected]>
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Message-ID | <[email protected]> |
> On Nov 20, 2016, at 10:25, Jim Fulton <[email protected]> wrote: > >> But it seems safe to say there are at least some discrepancies and some clear bugs in the handling of unorderable objects still. > > Yup. Partly I suspect this is the related to the many ways one can express comparison in Python. (Talk about more than one way to do it.) > > I think this may also be related to inserting into an empty BTree, where there's noting to compare the new item to and thus no opportunity to fail. Perhaps, if we're paranoid, we should compare the first item to itself on insert. You're right, under Python 3, this only happens in an empty tree. Once there are other items, you get "TypeError: unorderable types: Bad() < ..." errors. Under Python 2, of course, no such luck. > In any case, I think the focus for this seat belt should be on insertion. I've opened a series of issues in the repository (https://github.com/zopefoundation/BTrees/issues) that I think capture the discussion here. I may be able to come up with some PRs over the next week for them. One nice takeaway for None keys, at least, is that the Python implementation currently gets it more-or-less right. Jason -- You received this message because you are subscribed to the Google Groups "zodb" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.