Python 1.6 alpha 1 released

Just van Rossum just at letterror.com
Tue Apr 4 06:32:29 EDT 2000


At 8:48 AM +0000 04-04-2000, fredrik at pythonware.com wrote:
>> Consider that *every one* of the protocol modules which offers
>> a connect() method uses a two-argument signature for it:  ftplib,
>> gopherlib, httplib, imaplib, nntplib, poplib, smtplib, telnetlib,
>> urllib.  And they all *use* the two-argument connect when invoking
>> their underlying socket!
>
>not true.  look again (doesn't matter if you look in the 1.5.2
>library or the 1.6 library -- what you just said is not correct
>in either case).

Here's the result from a quick search through the Python 1.5.2 lib:

ftplib.py, line 109: 	def connect(self, host = '', port = 0):
ftplib.py, line 267: 			conn.connect(host, port)
gopherlib.py, line 69: 	s.connect(host, port)
httplib.py, line 51:         if host: self.connect(host, port)
httplib.py, line 62:     def connect(self, host, port = 0):
httplib.py, line 79:         self.sock.connect(host, port)
imaplib.py, line 185: 		self.sock.connect(self.host, self.port)
nntplib.py, line 70: 		self.sock.connect(self.host, self.port)
poplib.py, line 80: 		self.sock.connect(self.host, self.port)
smtplib.py, line 182:             (code, msg) = self.connect(host, port)
smtplib.py, line 195:     def connect(self, host='localhost', port = 0):
smtplib.py, line 216:         self.sock.connect(host, port)
test_socket.py, line 136:             s.connect(hostname, PORT)
urllib.py, line 571:         self.ftp.connect(self.host, self.port)

>(bogus facts or double standards doesn't count).

Lies don't help much either, Fredrik!

I honestly think Tres Seaver made some *excellent* points. Whether you like
it or not, people have been using the demos *and* the library as
documentation. Even if the official documentation says it should be a
tuple: one line of example code is worth more than 10 lines of
documentation, and in this case we're talking about tens of line of
examample code versus *2* lines of documentation.

Just






More information about the Python-list mailing list