Andy Mikhailenko committed d318dd1

Removed argument "value_processor" from modeling.merged() because since v.0.2.3 the list of mergers can be modified to achieve the same effect.

  • Participants
  • Parent commits 874d663

Comments (0)

Files changed (2)


     return value
-def merged(spec, data, value_processor=None, mergers=VALUE_MERGERS):
+def merged(spec, data, mergers=VALUE_MERGERS):
     """ Returns a dictionary based on `spec` + `data`.
     Does not validate values. If `data` overrides a default value, it is
         `dict`. A document structure specification.
     :param data:
         `dict`. Overrides some or all default values from the spec.
-    :param value_processor:
-        function, must take one argument and return the modified value.
     :param mergers:
         `tuple`. An ordered series of :class:`ValueMerger` subclasses.
         Default is :attr:`VALUE_MERGERS`. The mergers are passed to
             # them as they aren't in the spec
             value = data[key]
-        if value_processor:
-            value = value_processor(value)
         result[key] = value
     return result
         to `self` by merging the two structures
         (see :func:`monk.manipulation.merged`).
-        def process_value(value):
-            func_types = types.FunctionType, types.BuiltinFunctionType
-            if isinstance(value, func_types):
-                return value()
-            else:
-                return value
-        with_defaults = manipulation.merged(self.structure, self,
-                                            value_processor=process_value)
+        with_defaults = manipulation.merged(self.structure, self)
         for key, value in with_defaults.iteritems():
             self[key] = value