Make _SaverList properly handle index/remove operations. Resolves #1027.
This commit is contained in:
parent
873e6faa52
commit
00881c3bbe
1 changed files with 9 additions and 0 deletions
|
|
@ -204,6 +204,15 @@ class _SaverList(_SaverMutable, MutableSequence):
|
||||||
def insert(self, index, value):
|
def insert(self, index, value):
|
||||||
self._data.insert(index, self._convert_mutables(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):
|
class _SaverDict(_SaverMutable, MutableMapping):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue