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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4