[Python-Dev] [PEP 3148] futures - execute computations asynchronously

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Mar 7 00:19:42 CET 2010

Jeffrey Yasskin wrote:

> The caller can't avoid the error here by querying the future, because
> of the problem you point out below, so I'm inclined to think that "the
> future was already started" should be a return value rather than an
> exception (although that may be my C++ background showing through).

I think it's your C++ background showing. In Python philosophy,
there's no particlular connection between whether something can
be tested for and whether it should raise an exception.

The thing to consider, I think, is whether it makes sense in
a large proportion of use cases to ignore the fact that the
cancel failed and carry on regardless. If not, then raising an
exception makes it much harder to accidentally ignore the


More information about the Python-Dev mailing list