new Storage passes all tests
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.00.0 (2012-08-21 14:29:57) dev
|
Version 2.00.0 (2012-08-21 14:41:40) dev
|
||||||
|
|||||||
+3
-1
@@ -70,8 +70,8 @@ class Storage(dict):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
self.__dict__ = self
|
|
||||||
dict.__init__(self, *args, **kwargs)
|
dict.__init__(self, *args, **kwargs)
|
||||||
|
self.__dict__ = self
|
||||||
def __getattr__(self,key):
|
def __getattr__(self,key):
|
||||||
return getattr(self,key) if key in self else None
|
return getattr(self,key) if key in self else None
|
||||||
def __getitem__(self,key):
|
def __getitem__(self,key):
|
||||||
@@ -87,8 +87,10 @@ class Storage(dict):
|
|||||||
return dict(self)
|
return dict(self)
|
||||||
def __setstate__(self, sdict):
|
def __setstate__(self, sdict):
|
||||||
dict.__init__(self, sdict)
|
dict.__init__(self, sdict)
|
||||||
|
self.__dict__ = self
|
||||||
def update(self, *args, **kwargs):
|
def update(self, *args, **kwargs):
|
||||||
dict.__init__(self, *args, **kwargs)
|
dict.__init__(self, *args, **kwargs)
|
||||||
|
self.__dict__ = self
|
||||||
def getlist(self,key):
|
def getlist(self,key):
|
||||||
"""
|
"""
|
||||||
Return a Storage value as a list.
|
Return a Storage value as a list.
|
||||||
|
|||||||
Reference in New Issue
Block a user