Alan Kennedy wrote: > - Explicitly check that the address passed is a tuple of (string, integer) It's more probable that a use pass a list of two values, that a host of two letters as you suggested above... > - To raise an exception explaining the parameter expectation when it is not met Won't be necessary if we take into account the explicit timeout parameter... > - To require that the user explicitly name the timeout parameter I already agreed on this, :) So, as a resume: - I'll make "timeout" mandatory - The function signature will be: create_connection(address[, timeout]) See that timeout doesn't have a default value, if you include it, it'll set the socket timeout, if you don't, the defaultimeout will work. The address is a tuple (host, port), as usual In the code, I'll just make "host, port = address", I don't think it will be a problem at all. Remember that this function primary use is for higher level libraries, and that "address" in socket enviroment is always, always, (host, port). Regards, -- . Facundo . Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/
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