mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +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:
|
||||
raise IndexError, 'queue index out of range'
|
||||
if type(oidx) == types.SliceType:
|
||||
range = xrange(*sliceIndices(oidx, len(self)))
|
||||
range = xrange(*slice.indices(oidx, len(self)))
|
||||
if len(range) != len(value):
|
||||
raise ValueError, 'seq must be the same length as slice.'
|
||||
else:
|
||||
@ -252,7 +252,7 @@ class queue(object):
|
||||
|
||||
def __delitem__(self, oidx):
|
||||
if type(oidx) == types.SliceType:
|
||||
range = xrange(*sliceIndices(oidx, len(self)))
|
||||
range = xrange(*slice.indices(oidx, len(self)))
|
||||
for i in range:
|
||||
del self[i]
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user