• Tim Peters's avatar
    Fix for http://collector.zope.org/Zope/419, · f6a898f9
    Tim Peters authored
    "BTreeItems slice contains 1 too many elements"
    This also fixes many related glitches, such as that giving an
    out-of-bound slice index raised IndexError instead of clipping.
    
    BTreeItems_slice():  Emulate Python slicing semantics in all cases.
    
    testBTrees.py:  new testSlicing() tests in MappingBase and NormalSetTests
    to ensure that slicing of .keys()/.items()/.values() works exactly the
    same way as slicing of Python lists, in all one-sided, two-sided and
    whole-structure ([:]) cases, with both negative and positive slice indices,
    and mixtures of + and -, and whether in bounds or out of bounds.
    f6a898f9
testBTrees.py 26.8 KB