buildframework/helium/sf/python/pythoncore/lib/escapeddict.py
changeset 628 7c4a911dc066
parent 587 85df38eb4012
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
    36 
    36 
    37 
    37 
    38 class EscapedDict(UserDict.UserDict):
    38 class EscapedDict(UserDict.UserDict):
    39     """ Implements a dictionary that escapes the key values recursively. """        
    39     """ Implements a dictionary that escapes the key values recursively. """        
    40     
    40     
    41     def __init__(self, dict={}, failonerror=False):
    41     # pylint: disable=W0622
       
    42     def __init__(self, dict=None, failonerror=False):
       
    43         if dict == None:
       
    44             dict = {}
    42         UserDict.UserDict.__init__(self, dict)
    45         UserDict.UserDict.__init__(self, dict)
    43         self.__failonerror = failonerror
    46         self.__failonerror = failonerror
    44         
    47         
    45     def __getitem__(self, key):
    48     def __getitem__(self, key):
    46         """ Overrides the usual __getitem__ to insert values of other keys referenced in this key's
    49         """ Overrides the usual __getitem__ to insert values of other keys referenced in this key's