Salome HOME
projects
/
modules
/
kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'eap/23514'
[modules/kernel.git]
/
src
/
KERNEL_PY
/
kernel
/
diclookup.py
diff --git
a/src/KERNEL_PY/kernel/diclookup.py
b/src/KERNEL_PY/kernel/diclookup.py
index 140d13ad86e10b63d7148a6cb759ce63748b992f..1ec0eab1750e08177fa494d76245c734086a4a53 100644
(file)
--- a/
src/KERNEL_PY/kernel/diclookup.py
+++ b/
src/KERNEL_PY/kernel/diclookup.py
@@
-1,5
+1,5
@@
# -*- coding: iso-8859-1 -*-
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-201
4
CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-201
6
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
#
# 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
# \{
## \defgroup diclookup diclookup
# \{
-# \details Smart diction
n
ary with key/value lookup
+# \details Smart dictionary with key/value lookup
# \}
__author__="gboulant"
# \}
__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
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"""
"""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
dict.__init__(self, items)
## find the key(s) as a list given a value