Message246407
| Author |
gvanrossum |
| Recipients |
giampaolo.rodola, gvanrossum, ncoghlan, pitrou, srkunze, vstinner, yselivanov |
| Date |
2015年07月07日.12:53:40 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1436273620.59.0.244948431249.issue24571@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
You seem to miss that run_in_executor() does take *args -- so the partial() call is only needed if you need to pass keyword args. Is it really worth having a helper for this one-liner?
def call_async(func, *args):
return asyncio.get_event_loop().run_in_executor(func, *arg)
I'm on the fence myself. I do like the new name better. |
|