[Tutor] Please help....
Tue, 17 Oct 2000 10:10:56 -0700 (PDT)
On Tue, 17 Oct 2000, Rod Gray wrote:
> I'm a new python guy so I'm having trouble figuring this out.
> Yesterday, thie following code worked fine...setting up a chat server
> on port 4000 is it's purpose
> s.bind(HOST, PORT)
> While I understand the error...I don't understand why I get it now and
> not before with NO code alterations.
I'm guessing that you updated to Python 2.0. The bind() method got more
strict with the new version of Python. According to the reference
Bind the socket to address. The socket must not already be bound.
(The format of address depends on the address family -- see above.) Note:
This method has historically accepted a pair of parameters for AF_INET
addresses instead of only a tuple. This was never intentional and will no
longer be available in Python 1.7.
So having bind accept two arguments was a small bug. The designers have
fixed it, but at the expense of breaking old code.