On 9 January 2018 at 20:07, Antoine Pitrou <[email protected]> wrote: > On Mon, 8 Jan 2018 21:22:56 -0800 > Nathaniel Smith <[email protected]> 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 | [email protected] | Brisbane, Australia _______________________________________________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
