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
situation.

--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to