[issue31914] Document Pool.(star)map return type
New submission from Дилян Палаузов <dilyan.palauzov@aegee.org>: https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.... says: starmap(func, iterable[, chunksize]) Like map() except that the elements of the iterable are expected to be iterables that are unpacked as arguments. Hence an iterable of [(1,2), (3, 4)] results in [func(1,2), func(3,4)]. If it was like map() then it would have returned an iterator. Please clarify, that Pool.map and Pool.starmap return list. ---------- assignee: docs@python components: Documentation messages: 305337 nosy: dilyan.palauzov, docs@python priority: normal severity: normal status: open title: Document Pool.(star)map return type type: enhancement versions: Python 3.6 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue31914> _______________________________________
Дилян Палаузов <dilyan.palauzov@aegee.org> added the comment: Pool.starmap is not like map from the standard library, as the hyperlinking on the word map() suggests, but like Pool.map(). The latter talks about the chunksize parameter, but the former and Pool.starmap don't. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue31914> _______________________________________
Дилян Палаузов <dilyan.palauzov@aegee.org> added the comment: If the idea is one day to switch the return type to an iterable/generator, returning from starmap() before all parallel executions have completed, this needs to be documented and the typeshed adjusted accordingly. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue31914> _______________________________________
participants (1)
-
Дилян Палаузов