[Python-Dev] Adding timeout option to httplib...connect() (original) (raw)

Fred L. Drake, Jr. fdrake at acm.org
Fri Feb 9 19:53:24 CET 2007


On Friday 09 February 2007 08:52, skip at pobox.com wrote:

In principle it's probably a fine idea. We should consider if it's possible to develop a uniform approach to timeouts for all the libraries that use sockets though. Otherwise you run the risk of doing it in different ways for different libraries and having to make a (small, but annoying) semantic leap when going from, say, httplib to smtpllib or ftplib.

Agreed. In the meanwhile, there's socket.setdefaulttimeout(), which has proved quite useful.

-Fred

-- Fred L. Drake, Jr.



More information about the Python-Dev mailing list