Commit dfe773fb authored by Anton Pershin's avatar Anton Pershin

Upgraded make_composite_func so that it can optionally return values

parent af3e3b8c
......@@ -364,8 +364,14 @@ def make_dump(dump_name_format, format_keys=(), omit=None, method='pickle'):
def make_composite_func(*funcs):
def _composite(d):
res = None
for func in funcs:
func(d)
f_res = func(d)
# this trick allows us to combine returning
# and non-returning functions
if f_res is not None:
res = f_res
return res
return _composite
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment