* Parameters: if _flatten_ is enabled, must flatten in reverse order to

give the firstly mentioned dict the priority.
master
Wirawan Purwanto 12 years ago
parent 254aaca622
commit 8d32c2c067
  1. 4
      params/params_flat.py

@ -183,7 +183,7 @@ class Parameters(dict):
dict.clear(self)
if _opts_.get('_flatten_', False):
#FIXME# if p is a Parameters object, then we must recursively flatten it too
for p in _override_dicts_:
for p in _override_dicts_[::-1]:
dict.update(self, p)
dict.update(self, _opts_)
else:
@ -277,6 +277,8 @@ class Parameters(dict):
# self._prm_[key] = value
def _ActiveReadValue_(self, val):
"""Private subroutine for evaluating `active' members."""
#FIXME# Value overrides specified in enclosing Parameters object instance
# cannot be searched from this (enclosed) instance.
if isinstance(val, ActiveReadValue):
return val(self)
else:

Loading…
Cancel
Save