Overuse of try/except/else?
James Mills
prologic at shortcircuit.net.au
Sat May 21 03:08:18 EDT 2011
On Sat, May 21, 2011 at 3:40 PM, Cameron Simpson <cs at zip.com.au> wrote:
> These days I think I'd use a LateFunction (a facility of my own which is
> a lot like the futures module) which returns a callable when you submit
> a function; the worker thread runs the submitted function and catches the
> return value or raised exception. Anyone who calls the returned callable
> later gets the return value or the exception reraised as appropriate,
> so one can avoid the dangerous "catch everything and log" scenario.
I like this :) I guess you call this a Proxy Object although
your calling it a LateFunction seems more "fitting" :)
cheers
James
--
-- James Mills
--
-- "Problems are solved by method"
More information about the Python-list
mailing list