+\r
+def _decorate_with(fn):\r
+ def decorator(origin):\r
+ origin = _check_decoratable(origin)\r
+ origin._decoratable_obj._decorate(fn, DecoratableObject.MODE_OVERRIDE, needs_origin=True)\r
+ return origin\r
+ return decorator\r
+\r
+decorate.withfn = _decorate_with\r
+\r
+def _decorate_result_with(fn, needs_params=False):\r
+ def decorator(origin):\r
+ origin = _check_decoratable(origin)\r
+ origin._decoratable_obj._decorate(fn, DecoratableObject.MODE_RESULT, needs_params=needs_params)\r
+ return origin\r
+ return decorator\r
+\r
+decorate.result.withfn = _decorate_result_with\r
+\r
+def _decorate_params_with(fn):\r
+ def decorator(origin):\r
+ origin = _check_decoratable(origin)\r
+ origin._decoratable_obj._decorate(fn, DecoratableObject.MODE_PARAMS)\r
+ return origin\r
+ return decorator\r
+\r
+decorate.params.withfn = _decorate_params_with
\ No newline at end of file