changeset 6376 | f8662240ed4d |
parent 6225 | a176e68b7d0d |
parent 6374 | 5adf53edfe12 |
child 6409 | d75535983224 |
--- a/utils.py Fri Oct 01 09:26:17 2010 +0200 +++ b/utils.py Fri Oct 01 11:24:21 2010 +0200 @@ -166,6 +166,9 @@ return repeat(self._item, self._size) def __getitem__(self, index): return self._item + def __delitem__(self, idc): + assert self._size > 0 + self._size -= 1 def __getslice__(self, i, j): # XXX could be more efficient, but do we bother? return ([self._item] * self._size)[i:j]