[Python-ideas] make Connections iterable

Antoine Pitrou solipsis at pitrou.net
Tue Jan 9 05:07:34 EST 2018


On Mon, 8 Jan 2018 21:22:56 -0800
Nathaniel Smith <njs at pobox.com> wrote:
> 
> The only documented error from multiprocessing.Connection.recv is EOFError,
> which is basically equivalent to a StopIteration.

Actually recv() can raise an OSError corresponding to any system-level
error.

> I'm surprised that multiprocessing.Connection isn't iterable -- it seems
> like an obvious oversight.

What is obvious about making a connection iterable?  It's the first
time I see someone requesting this.

Regards

Antoine.




More information about the Python-ideas mailing list