Guido> I recently needed to access an HTTP URL with a timeout. I ended
Guido> up monkey-patching httplib.HTTPConnection so that the connect()
Guido> method has an optional second paramer, timeout, defaulting to
Guido> None; if not None, a call to settimeout() is added right after
Guido> successful creation of the socket.
Guido> Does anybody else think this is a good idea?
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.
Skip
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com