Forgot to add these changes which are needed by the addressbook
[theonering] / src / util / coroutines.py
index 6d802e8..b1e539e 100755 (executable)
@@ -156,6 +156,19 @@ def comap(function, target):
                        target.throw(e.__class__, e.message)\r
 \r
 \r
+def func_sink(function):\r
+       return comap(function, null_sink())\r
+\r
+\r
+def expand_positional(function):\r
+\r
+       @functools.wraps(function)\r
+       def expander(item):\r
+               return function(*item)\r
+\r
+       return expander\r
+\r
+\r
 @autostart\r
 def append_sink(l):\r
        """\r