New submission from James McDermott <jamesmichaelmcderm...@gmail.com>:
I found the documentation for the multiprocessing.Pool.map() method to be a little misleading, because it claims to be equivalent to the built- in map(), but it's not quite. When the function to be applied takes just one argument, both map()s behave the same. But built-in map() allows the function to take multiple arguments (taking them from multiple iterables) whereas multiprocessing.Pool.map() requires it to have only a single argument, and if necessary its iterable argument must be composed of tuples to be unpacked inside the function. >From http://docs.python.org/library/multiprocessing.html#multiprocessing.pool .multiprocessing.Pool.map map(func, iterable[, chunksize]) A parallel equivalent of the map() builtin function. >From http://docs.python.org/library/functions.html#map map(function, iterable, ...) Apply function to every item of iterable and return a list of the results. If additional iterable arguments are passed, function must take that many arguments and is applied to the items from all iterables in parallel. ---------- assignee: georg.brandl components: Documentation messages: 84991 nosy: georg.brandl, jmmcd severity: normal status: open title: multiprocessing.Pool.map() docs slightly misleading type: feature request versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5642> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com