summaryrefslogtreecommitdiff
path: root/Lib/nntplib.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-12-17 15:25:27 +0000
committerGuido van Rossum <guido@python.org>1993-12-17 15:25:27 +0000
commitb0448b68ce6a58e18b4397c21f7bf8b60c419d81 (patch)
treea721a31811b269e76cf3177c24dbfc7b9409ce4a /Lib/nntplib.py
parentb5bf4a34fc8161800264a3db733909c91bd339ed (diff)
downloadcpython-b0448b68ce6a58e18b4397c21f7bf8b60c419d81.tar.gz
* 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)
Diffstat (limited to 'Lib/nntplib.py')
-rw-r--r--Lib/nntplib.py7
1 files changed, 3 insertions, 4 deletions
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