You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tried to use aplus, but I couldn't make it run the error handler when an exception occurred such as a typo in the called code.
I then switched to concurrent.futures (the backported one) and that works fine for exceptions, but I miss the Promises/A+ interface, especially being able to transparently return a new promise as the result of a promise.
Could you be a bit more specific about what you'd like aplus to do? A test case would be great. I suspect it can be done (and still satisfy the A+ spec).
And implementing on top of concurrent.futures is probably a good idea. I just don't know much about it. The problem is that Python doesn't really lend itself so well to this kind of thing without a standard way of dealing with queueing of work to be done.
Thanks for your feedback. I don't expect to have time in the near term to look into this. But I'll keep this open. Perhaps someone else will come along and implement something here. I'd gladly accept a pull request.
Activity
xogeny commentedon Jun 10, 2014
Could you be a bit more specific about what you'd like aplus to do? A test case would be great. I suspect it can be done (and still satisfy the A+ spec).
xogeny commentedon Jun 10, 2014
And implementing on top of concurrent.futures is probably a good idea. I just don't know much about it. The problem is that Python doesn't really lend itself so well to this kind of thing without a standard way of dealing with queueing of work to be done.
wmertens commentedon Jun 10, 2014
Well, I tried to use
aplus.background(lambda: somefunction(foo)).then(...)in various ways, but code errors did not throw exceptions.When instead I did
Much uglier than Promises/A+, but it works...
xogeny commentedon Jun 11, 2014
Thanks for your feedback. I don't expect to have time in the near term to look into this. But I'll keep this open. Perhaps someone else will come along and implement something here. I'd gladly accept a pull request.