On 9 January 2018 at 20:07, Antoine Pitrou <solip...@pitrou.net> wrote:
> On Mon, 8 Jan 2018 21:22:56 -0800
> Nathaniel Smith <n...@pobox.com> wrote:
>> 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.

If you view them as comparable to subprocess pipes, then it can be
surprising that they're not iterable when using a line-oriented
protocol.

If you instead view them as comparable to socket connections, then the
lack of iteration support seems equally reasonable.

Hence my suggestion of providing a docs recipe showing an example of
wrapping a connection in a generator in order to define a suitable way
of getting from a raw bytestream to iterable chunks.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to