From 0dfbbf5e5f2f9fb66d8b65ebfac28f87c474d7b2 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 29 Sep 2009 21:58:21 -0500 Subject: [PATCH] Forgot to add these changes which are needed by the addressbook --- src/util/coroutines.py | 13 +++++++++++++ src/util/misc.py | 1 - 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/util/coroutines.py b/src/util/coroutines.py index 6d802e8..b1e539e 100755 --- a/src/util/coroutines.py +++ b/src/util/coroutines.py @@ -156,6 +156,19 @@ def comap(function, target): target.throw(e.__class__, e.message) +def func_sink(function): + return comap(function, null_sink()) + + +def expand_positional(function): + + @functools.wraps(function) + def expander(item): + return function(*item) + + return expander + + @autostart def append_sink(l): """ diff --git a/src/util/misc.py b/src/util/misc.py index 7abecf3..85c6ca0 100644 --- a/src/util/misc.py +++ b/src/util/misc.py @@ -6,7 +6,6 @@ import sys import cPickle import functools -import itertools import contextlib import inspect -- 1.7.9.5