A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-March/034039.html below:

[Python-Dev] Iterable sockets?

[Python-Dev] Iterable sockets? [Python-Dev] Iterable sockets?Guido van Rossum guido@python.org
Thu, 13 Mar 2003 20:57:00 -0500
> Line oriented network protocols are very common, and I often find myself
> calling the socket makefile method so I can read complete lines from a
> socket. I'm probably not the first one who's wished that socket objects
> where more file-like.
> 
> While I don't think we'd want to go as far as to turn them into a stdio
> based file object, it might make sense to allow them to be iterated over
> (and add a .readline() method, I guess). This would necessitate adding some
> input buffering, which will complicate things like the .recv() method, so
> I'm not sure it's that good an idea, but it removes one gotchya for
> neophytes (and forgetful veterans). Thoughts?

Um, why doesn't the makefile() method do what you want?

--Guido van Rossum (home page: http://www.python.org/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4