[Python-ideas] make Connections iterable

Nathaniel Smith njs at pobox.com
Tue Jan 9 00:22:56 EST 2018


On Mon, Jan 8, 2018 at 7:27 PM, Amit Green <amit.mixie at gmail.com> wrote:

> An argument against this API, is that any caller of recv should be doing
> error handling (i.e.: catching exceptions from the socket).
>

It's still not entirely clear, but I'm pretty sure this thread is talking
about multiprocessing.Connection objects, which don't have anything to do
with sockets. (I think. They might use sockets internally on some
platforms.)

The only documented error from multiprocessing.Connection.recv is EOFError,
which is basically equivalent to a StopIteration.

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

-n

-- 
Nathaniel J. Smith -- https://vorpus.org <http://vorpus.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180108/530943fe/attachment.html>


More information about the Python-ideas mailing list