Make _SaverList properly handle index/remove operations. Resolves #1027.

This commit is contained in:
Griatch 2016-08-31 14:45:56 +02:00
parent 873e6faa52
commit 00881c3bbe

View file

@ -204,6 +204,15 @@ class _SaverList(_SaverMutable, MutableSequence):
def insert(self, index, value):
self._data.insert(index, self._convert_mutables(value))
def __eq__(self, other):
try:
return list(self._data) == list(other)
except TypeError:
return False
def index(self, value, *args):
return self._data.index(value, *args)
class _SaverDict(_SaverMutable, MutableMapping):
"""