[Python-Dev] PEP 3148 ready for pronouncement [ACCEPTED]

Nick Coghlan ncoghlan at gmail.com
Mon Jul 12 16:48:35 CEST 2010


On Tue, Jul 13, 2010 at 12:19 AM, Titus von der Malsburg
<malsburg at gmail.com> wrote:
> This reminds me a lot of how things are done in C but it's not very
> pythonic.  Wouldn't it be possible and nicer to raise the exception --
> if there was one inside the asynchronous job -- when the result of the
> future is accessed?

That's what actually happens, so you can code it either way (either
just calling result() and dealing with any exception that was raised,
or else checking for a non-None exception value directly).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list