X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FKERNEL_PY%2Fkernel%2Fdiclookup.py;h=1ec0eab1750e08177fa494d76245c734086a4a53;hb=82668fe5e4d077072402d253497f96d4c53391f9;hp=140d13ad86e10b63d7148a6cb759ce63748b992f;hpb=48d150b078ab63d77fbed4de1f8dbd7d3a8767da;p=modules%2Fkernel.git diff --git a/src/KERNEL_PY/kernel/diclookup.py b/src/KERNEL_PY/kernel/diclookup.py index 140d13ad8..1ec0eab17 100644 --- a/src/KERNEL_PY/kernel/diclookup.py +++ b/src/KERNEL_PY/kernel/diclookup.py @@ -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