Max 64 connections/thread under Windows?

Jp Calderone exarkun at intarweb.us
Tue Nov 4 13:24:40 EST 2003


On Mon, Nov 03, 2003 at 10:18:08PM +0000, Krister L. wrote:
> Hi all,
> 
> Newbie warning on.
> 
> [snip]
> 
> 
> To pick up the errno I also need to write something like
>     except error, (errno, strerror):
> 
> when I would expect
>     except error
>         errno, strerror = error

  When you use the former syntax, the exceptions arguments are unpacked into
the (errno, strerror).  You can achieve the same by doing:

    except error, e:
        errno, strerror = e.args


  Also, I would recommend not doing "from socket import error", but rather
"import socket" and then using "socket.error".  This helps keep code more
clear and easy to read.

  Jp





More information about the Python-list mailing list