Hi, would there be a better way to check if a btree contains a given key, that would be better than doing: key in btree.keys() What seems costly is the underlying btree.iterkeys() that loops over the items... and maybe this is what would need to be modified. Is this operation an inevitably expensive one? mario