Salome HOME
Merge branch 'eap/23514'
[modules/kernel.git] / src / KERNEL_PY / kernel / diclookup.py
index 140d13ad86e10b63d7148a6cb759ce63748b992f..1ec0eab1750e08177fa494d76245c734086a4a53 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -23,7 +23,7 @@
 
 ## \defgroup diclookup diclookup
 #  \{ 
-#  \details Smart dictionnary with key/value lookup
+#  \details Smart dictionary with key/value lookup
 #  \}
 
 __author__="gboulant"
@@ -53,8 +53,10 @@ class Lookup(dict):
     a dictionary which can lookup value by key, or keys by value
     """
     ## items can be a list of pair_lists or a dictionary
-    def __init__(self, items=[]):
+    def __init__(self, items=None):
         """items can be a list of pair_lists or a dictionary"""
+       if items is None:
+           items = []
         dict.__init__(self, items)
 
     ## find the key(s) as a list given a value