Xiang Zhang added the comment:

In Py3.6, it raises error:

>>> next((pool.imap(str, gen())))
Traceback (most recent call last):
  File "/opt/lib/python3.7/multiprocessing/pool.py", line 684, in next
    item = self._items.popleft()
IndexError: pop from an empty deque

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/lib/python3.7/multiprocessing/pool.py", line 690, in next
    item = self._items.popleft()
IndexError: pop from an empty deque

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/lib/python3.7/multiprocessing/pool.py", line 693, in next
    raise StopIteration
StopIteration

But this doesn't looks good. I think it should raise TypeError. It can be fixed 
in #28699.

----------
nosy: +xiang.zhang

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28696>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to