[issue5642] multiprocessing.Pool.map() docs slightly misleading
James McDermott
report at bugs.python.org
Wed Apr 1 11:49:48 CEST 2009
New submission from James McDermott <jamesmichaelmcdermott at 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 <report at bugs.python.org>
<http://bugs.python.org/issue5642>
_______________________________________
More information about the Python-bugs-list
mailing list