Forgot to add these changes which are needed by the addressbook
authorEd Page <eopage@byu.net>
Wed, 30 Sep 2009 02:58:21 +0000 (21:58 -0500)
committerEd Page <eopage@byu.net>
Wed, 30 Sep 2009 02:58:21 +0000 (21:58 -0500)
src/util/coroutines.py
src/util/misc.py

index 6d802e8..b1e539e 100755 (executable)
@@ -156,6 +156,19 @@ def comap(function, target):
                        target.throw(e.__class__, e.message)\r
 \r
 \r
                        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
 @autostart\r
 def append_sink(l):\r
        """\r
index 7abecf3..85c6ca0 100644 (file)
@@ -6,7 +6,6 @@ import sys
 import cPickle
 
 import functools
 import cPickle
 
 import functools
-import itertools
 import contextlib
 import inspect
 
 import contextlib
 import inspect