diff options
Diffstat (limited to 'Lib/test/test_zipfile/_functools.py')
-rw-r--r-- | Lib/test/test_zipfile/_functools.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_zipfile/_functools.py b/Lib/test/test_zipfile/_functools.py new file mode 100644 index 0000000..75f2b20 --- /dev/null +++ b/Lib/test/test_zipfile/_functools.py @@ -0,0 +1,9 @@ +import functools + + +# from jaraco.functools 3.5.2 +def compose(*funcs): + def compose_two(f1, f2): + return lambda *args, **kwargs: f1(f2(*args, **kwargs)) + + return functools.reduce(compose_two, funcs) |