Clean-up test class for DictMixin.
This commit is contained in:
parent
d2bef8256b
commit
0efa17c943
|
@ -155,8 +155,12 @@ class SeqDict(DictMixin):
|
|||
raise KeyError
|
||||
return self.valuelist[i]
|
||||
def __setitem__(self, key, value):
|
||||
self.keylist.append(key)
|
||||
self.valuelist.append(value)
|
||||
try:
|
||||
i = self.keylist.index(key)
|
||||
self.valuelist[i] = value
|
||||
except ValueError:
|
||||
self.keylist.append(key)
|
||||
self.valuelist.append(value)
|
||||
def __delitem__(self, key):
|
||||
try:
|
||||
i = self.keylist.index(key)
|
||||
|
|
Loading…
Reference in New Issue