summaryrefslogtreecommitdiffstats
path: root/Lib/rfc822.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/rfc822.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/rfc822.py')
-rw-r--r--Lib/rfc822.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/rfc822.py b/Lib/rfc822.py
index 63f2fb6..39ab6a6 100644
--- a/Lib/rfc822.py
+++ b/Lib/rfc822.py
@@ -10,8 +10,8 @@
# fp = open(file, 'r')
# (or use any other legal way of getting an open file object, e.g. use
# sys.stdin or call os.popen()).
-# Then pass the open file object to the init() method of Message:
-# m = Message().init(fp)
+# Then pass the open file object to the Message() constructor:
+# m = Message(fp)
#
# To get the text of a particular header there are several methods:
# str = m.getheader(name)
@@ -35,7 +35,7 @@ class Message:
# Initialize the class instance and read the headers.
- def init(self, fp):
+ def __init__(self, fp):
self.fp = fp
#
try:
@@ -49,8 +49,6 @@ class Message:
self.startofbody = self.fp.tell()
except IOError:
self.startofbody = None
- #
- return self
# Rewind the file to the start of the body (if seekable).