Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ def _clean_slice(key, length):
if not isinstance(stop, integer_types):
raise TypeError('Cell indices must be integers, %s given.' % type(stop).__name__)
if start < 0:
start = start + length
start += length
if stop < 0:
stop = stop + length
stop += length
start, stop = max(0, start), min(length, stop)
if start == stop:
raise ValueError('Cell slice can not be empty.')
Expand Down