summaryrefslogtreecommitdiffstats
path: root/Lib/nntplib.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-12-17 15:25:27 (GMT)
committerGuido van Rossum <guido@python.org>1993-12-17 15:25:27 (GMT)
commit7bc817d5ba917528e8bd07ec461c635291e7b06a (patch)
treed244fa2c8a15248efe095823be9f5e690a2efe38 /Lib/nntplib.py
parentaa14837bd00c28997dbde4014f8c994b9482def1 (diff)
downloadcpython-7bc817d5ba917528e8bd07ec461c635291e7b06a.zip
cpython-7bc817d5ba917528e8bd07ec461c635291e7b06a.tar.gz
cpython-7bc817d5ba917528e8bd07ec461c635291e7b06a.tar.bz2
* 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 c448d48..e7f0627 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