~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/index.py

Merge the 2.1-simple-set branch

But revert the changes to bzrlib/_btree_serializer_pyx.pyx that didn't end up in that branch.
And restore the export and import headers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    debug,
41
41
    errors,
42
42
    )
43
 
from bzrlib._static_tuple_c import StaticTuple
44
43
 
45
44
_HEADER_READV = (0, 200)
46
45
_OPTION_KEY_ELEMENTS = "key_elements="
103
102
 
104
103
    def _check_key(self, key):
105
104
        """Raise BadIndexKey if key is not a valid key for this index."""
106
 
        if type(key) not in (tuple, StaticTuple):
 
105
        if type(key) != tuple:
107
106
            raise errors.BadIndexKey(key)
108
107
        if self._key_length != len(key):
109
108
            raise errors.BadIndexKey(key)