> Restrictions are fine when they are either
> * enforced (I know BTrees do not enforce the "no mixed key types"
> * clearly documented
> I do not know whether the ZODB 3.4 BTrees interfaces document
> the restriction (this would be a good place, I think)
> Hopefully, they do ;-)
No, they don't. Patches accepted <0.5 wink>. There are many ways to
get in trouble with BTrees (mixing key types is just one), and the
ZODB Programming Guide has pages of discussion of potential pitfalls
(including mixing key types) already:
(and a copy of that in PDF format is shipped in every ZODB release).
I don't think mixing key types is, e.g., more important than the other
ways to create an insane BTree, and I don't think pages of discussion
fit sanely in interface docstrings either. This is something that
belongs in documentation. Since it already is covered in the only
"official" ZODB docs, I'm not inclined to do more than that.
Zope3-dev mailing list