mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Must've missed some sliceIndices conversion.
This commit is contained in:
parent
05eabee767
commit
a11873a260
@ -231,7 +231,7 @@ class queue(object):
|
|||||||
if len(self) == 0:
|
if len(self) == 0:
|
||||||
raise IndexError, 'queue index out of range'
|
raise IndexError, 'queue index out of range'
|
||||||
if type(oidx) == types.SliceType:
|
if type(oidx) == types.SliceType:
|
||||||
range = xrange(*sliceIndices(oidx, len(self)))
|
range = xrange(*slice.indices(oidx, len(self)))
|
||||||
if len(range) != len(value):
|
if len(range) != len(value):
|
||||||
raise ValueError, 'seq must be the same length as slice.'
|
raise ValueError, 'seq must be the same length as slice.'
|
||||||
else:
|
else:
|
||||||
@ -252,7 +252,7 @@ class queue(object):
|
|||||||
|
|
||||||
def __delitem__(self, oidx):
|
def __delitem__(self, oidx):
|
||||||
if type(oidx) == types.SliceType:
|
if type(oidx) == types.SliceType:
|
||||||
range = xrange(*sliceIndices(oidx, len(self)))
|
range = xrange(*slice.indices(oidx, len(self)))
|
||||||
for i in range:
|
for i in range:
|
||||||
del self[i]
|
del self[i]
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user