This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: This line used to work: sd.connect (routerlanip, 80)
Type: Stage:
Components: Extension Modules Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: b-52, gvanrossum
Priority: normal Keywords:

Created on 2001-01-08 03:52 by b-52, last changed 2022-04-10 16:03 by admin. This issue is now closed.

Messages (2)
msg2846 - (view) Author: R Lind (b-52) Date: 2001-01-08 03:52
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
msg2847 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001-01-08 13:33
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)).
History
Date User Action Args
2022-04-10 16:03:36adminsetgithub: 33671
2001-01-08 03:52:52b-52create