mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Made it so if IndexError is raised, the data structure isn't modified in __delitem__
This commit is contained in:
parent
0f018d0221
commit
76539b36ef
@ -228,6 +228,10 @@ class queue(object):
|
||||
if len(range) != len(value):
|
||||
raise ValueError, 'seq must be the same length as slice.'
|
||||
else:
|
||||
for i in range:
|
||||
(m, idx) = divmod(oidx, len(self))
|
||||
if m and m != -1:
|
||||
raise IndexError, oidx
|
||||
for (i, x) in zip(range, value):
|
||||
self[i] = x
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user