From 7bc817d5ba917528e8bd07ec461c635291e7b06a Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 17 Dec 1993 15:25:27 +0000 Subject: * Mass change: get rid of all init() methods, in favor of __init__() constructors. There is no backward compatibility. Not everything has been tested. * aiff.{py,doc}: deleted in favor of aifc.py (which contains its docs as comments) --- Lib/nntplib.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Lib/nntplib.py') diff --git a/Lib/nntplib.py b/Lib/nntplib.py index c448d48241..e7f0627595 100644 --- a/Lib/nntplib.py +++ b/Lib/nntplib.py @@ -5,7 +5,7 @@ # Example: # # >>> from nntplib import NNTP -# >>> s = NNTP().init('charon') +# >>> s = NNTP('charon') # >>> resp, count, first, last, name = s.group('nlnet.misc') # >>> print 'Group', name, 'has', count, 'articles, range', first, 'to', last # Group nlnet.misc has 525 articles, range 6960 to 7485 @@ -60,7 +60,7 @@ class NNTP: # - host: hostname to connect to # - port: port to connect to (default the standard NNTP port) - def init(self, host, *args): + def __init__(self, host, *args): if len(args) > 1: raise TypeError, 'too many args' if args: port = args[0] else: port = NNTP_PORT @@ -71,10 +71,9 @@ class NNTP: self.file = self.sock.makefile('r') self.debugging = 0 self.welcome = self.getresp() - return self # Get the welcome message from the server - # (this is read and squirreled away by init()). + # (this is read and squirreled away by __init__()). # If the response code is 200, posting is allowed; # if it 201, posting is not allowed -- cgit v1.2.1