This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients docs@python, eli.bendersky, exarkun, ezio.melotti, pitrou
Date 2011-05-21.11:01:26
SpamBayes Score 8.881784e-16
Marked as misclassified No
Message-id <1305975687.75.0.779081458321.issue12126@psf.upfronthosting.co.za>
In-reply-to
Content
Well, my main issue with this document is that it doesn't seem to have a well-defined destination:
- people who know sockets won't learn anything from it
- but people who don't know sockets will probably find it clear as mud (for example, what's an "INET" or "STREAM" socket? what's "select"?)

I have other issues, such as the style/tone it's written in. I'm sure the author had fun writing it but it doesn't fit well with the rest of the documentation. Also, the author gives a lot of "advice" without really giving an example ("if somewhere in those input lists of sockets is one which has died a nasty death, the select will fail" -> is that really true? what is a "nasty death" and how is that supposed to happen? couldn't the author have put a 3-line example to demonstrate this supposed drawback and how it manifests?).

And, finally, many statements seem arbitrary ("There’s no question that the fastest sockets code uses non-blocking sockets and select to multiplex them") or plain wrong ("threading support in Unixes varies both in API and quality. So the normal Unix solution is to fork a subprocess to deal with each connection"). I don't think giving misleading advice to users is really a good idea. And suggesting beginners they use non-blocking sockets without even *showing* how (or pointing to asyncore or Twisted) is a very bad idea. select() is not enough, you still have to be prepared to get EAGAIN or EWOULDBLOCK when calling recv() or send() (i.e. select() can give false positives).

Oh and I think it's obsolete too, because the "class mysocket" concatenates the output of recv() with a str rather than a bytes object. Not to mention that features of the "class mysocket" can be had using a buffered socket.makefile() instead of writing custom code.
History
Date User Action Args
2011-05-21 11:01:27pitrousetrecipients: + pitrou, exarkun, ezio.melotti, eli.bendersky, docs@python
2011-05-21 11:01:27pitrousetmessageid: <1305975687.75.0.779081458321.issue12126@psf.upfronthosting.co.za>
2011-05-21 11:01:27pitroulinkissue12126 messages
2011-05-21 11:01:26pitroucreate