# HG changeset patch # User Thierry Bertin-Mahieux # Date 1213207054 14400 # Node ID 105b54ac8260180c9bf94db4da29cc4e2b9aad11 # Parent 009ce84e9f5216a451ff063a1694ff79691daf22 bug fixed concerning the slicing, now ds[0:len(ds) + 1000 : 2] is accepted, same a python list diff -r 009ce84e9f52 -r 105b54ac8260 dataset.py --- a/dataset.py Wed Jun 11 13:53:39 2008 -0400 +++ b/dataset.py Wed Jun 11 13:57:34 2008 -0400 @@ -481,6 +481,7 @@ if type(i) is slice: offset = 0 if i.start is None else i.start upper_bound = len(self) if i.stop is None else i.stop + upper_bound = min(len(self) , upper_bound) i = list(range(offset, upper_bound, i.step)) # handle tuples, arrays, lists