[Python-bugs-list] [Bug #127992] This line used to work: sd.connect (routerlanip, 80)

noreply@sourceforge.net noreply@sourceforge.net
Mon, 08 Jan 2001 05:33:58 -0800


Bug #127992, was updated on 2001-Jan-07 19:52
Here is a current snapshot of the bug.

Project: Python
Category: Extension Modules
Status: Closed
Resolution: Invalid
Bug Group: Not a Bug
Priority: 5
Submitted by: b-52
Assigned to : nobody
Summary: This line used to work: sd.connect (routerlanip, 80)

Details: This line used to work under 1.6:
   sd.connect (routerlanip, 80)
Now it returns the following error:

Traceback (most recent call last):
  File "linksysdynhostsync.py", line 89, in ?
    sd.connect (routerlanip, 80)
  File "<string>", line 1, in connect
TypeError: connect requires exactly 1 argument; 2 given

The "sd" object is opened as follows:
   sd = socket.socket (socket.AF_INET, socket.SOCK_STREAM)
The variable "routerlanip" is set to an IP address e.g. 10.0.0.1
HELP

Follow-Ups:

Date: 2001-Jan-08 05:33
By: gvanrossum

Comment:
connect() was always documented as having a single 'address' argument, but
the implementation was lax and allowed s.connect(host, port) instead of
s.connect((host, port)).  This was fixed in 2.0, just as list.append(a,b,c)
is no longer allowed and must now be written as list.append((a,b,c)).
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=127992&group_id=5470