[ZODB-Dev] Call for volunteers: help w finishing Python BTrees
Pedro Ferreira
jose.pedro.ferreira at cern.ch
Tue Oct 25 21:37:57 UTC 2011
>> Can you explain the rationale for dropping the use of '_marker' in
>> favor of 'None'?
>
> As far as I can remember some tests in ZODB explicitly pass (None, None)
> when iterating over the whole structure, bit I will give it a better
> look later.
OK, for instance:
(MappingStorage.py)
"""
def iterator(self, start=None, end=None):
for transaction_record in self._transactions.values(start, end):
yield transaction_record
"""
which ultimately takes us to:
(___BTree.py)
"""
def _range(self, min=_marker, max=_marker,
excludemin=False, excludemax=False):
if min is _marker:
start = 0
if excludemin:
start = 1
# ...
"""
somewhere along the way `None` should be translated to `_marker`, but
that currently doesn't happen, which causes some of the tests to fail.
Cheers,
Pedro
More information about the ZODB-Dev
mailing list