[Python-ideas] make Connections iterable

Oscar Smith oscardssmith at gmail.com
Mon Jan 8 11:17:30 EST 2018


I am currently working on a program where it would be really useful if a
connection had a __next__ method, because then it would be much easier to
iterate over. It would just be an alias to recv, but would allow you to do
things like merging the results of connections using heapq.merge that
currently are highly non-trivial to accomplish. Is there a reason this API
isn't supported?
Oscar Smith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180108/4b46a111/attachment.html>


More information about the Python-ideas mailing list