durusmail: durus-users: btree.has_key() ?
btree.has_key() ?
2005-07-04
2005-07-06
2005-07-06
btree.has_key() ?
Mario Ruggier
2005-07-04
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

reply