Made it so if IndexError is raised, the data structure isn't modified in __delitem__

This commit is contained in:
Jeremy Fincher 2003-06-02 06:47:53 +00:00
parent 0f018d0221
commit 76539b36ef

View File

@ -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: