From f3a511ba8b6539a115f31c12b4e03964ce7990fb Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 16 Apr 2009 08:44:16 -0500 Subject: [PATCH] I think its best not to pass on exceptions, besides it improves the readability of them --- src/coroutines.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/coroutines.py b/src/coroutines.py index 320eb10..9ab75bf 100755 --- a/src/coroutines.py +++ b/src/coroutines.py @@ -148,12 +148,9 @@ def comap(function, target): >>> # cm.close() """ while True: - try: - item = yield - mappedItem = function(item) - target.send(mappedItem) - except StandardError, e: - target.throw(e.__class__, e.message) + item = yield + mappedItem = function(item) + target.send(mappedItem) def func_sink(function): -- 1.7.9.5