-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multiprocessing.Pool is missing a starmap[_async]() method. #56917
Comments
After I've seen a co-worker to unpack tuples while using multiprocessing.Pool.map(), I realized that the module is missing a starmap() method like itertools has. I took it as a opportunity to contribute some code and implemented both starmap() and starmap_async(). The patch including tests is attached, please let me know, what you think. Please don't call me names, it's my first patch for such a high profile project like Python. ;) |
In all my excitement, I somehow presumed that the docstring automagically lands in the docs. Added doc entries to patch (I hope they aren't too crude, I'm not a native speaker). Same as first patch otherwise. |
+def starmapstar(args): Is your new function restricted to 2 arguments? |
No, that's just a helper function like the |
This looks like a reasonable request to me, and the patch looks generally ok as well. |
One nit: the patch needs "versionadded" tags for the two new functions. |
Thanks for the feedback Antoine! I updated the patch to latest default tip and added the requested tags to the docs. |
Looks good to me, except for another minor nit: AFAICT, you just require the elements of |
You're right. I've updated the docs accordingly, thanks! |
New changeset b07b1e58582d by Antoine Pitrou in branch 'default': |
Patch committed. Thanks for your contribution! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: