noufal at gmail.com
Fri Mar 12 07:57:44 CET 2010
On Fri, Mar 12, 2010 at 12:04 PM, Goudar, Girish
<Girish.Goudar at goodrich.com> wrote:
> Can u pls tell what the return value of python function is?
> socket.connect((host, port))
> on SUCCESS and on FAIL?
The details are at http://docs.python.org/library/socket.html
Python code doesn't usually rely on returning an error value. All
error conditions are abstracted into exceptions which your calling
code can catch. From the docs.
All errors raise exceptions. The normal exceptions for invalid
argument types and out-of-memory conditions can be raised; errors
related to socket or address semantics raise the error socket.error.
More information about the BangPypers