summaryrefslogtreecommitdiff
path: root/Lib/mailbox.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-04-15 13:32:27 +0000
committerGuido van Rossum <guido@python.org>2001-04-15 13:32:27 +0000
commit05c004f2bd8aebf32a52b8e24d103f9a32425e7c (patch)
tree02b5eb4952a2e79158d1909697b7d1122c6a3f53 /Lib/mailbox.py
parentab052b7bef859dcb017ed1fcacd7bb08c39fab07 (diff)
downloadcpython-05c004f2bd8aebf32a52b8e24d103f9a32425e7c.tar.gz
Get rid of the seek() method on the _Mailbox class. This was a
cut-and-paste copy of the seek() method on the _Subfile class, but it didn't make one bit of sense: it sets self.pos, which is not used in this class or its subclasses, and it uses self.start and self.stop, which aren't defined on this class or its subclasses. This is purely my own fault -- I added this in rev 1.4 and apparently never tried to use it. Since it's not documented, and of very questionable use given that there's no tell(), I'm ripping it out. This resolves SF bug 416199 by Andrew Dalke: mailbox.py seek problems.
Diffstat (limited to 'Lib/mailbox.py')
-rwxr-xr-xLib/mailbox.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/Lib/mailbox.py b/Lib/mailbox.py
index 2f96106c6e..29322ed16b 100755
--- a/Lib/mailbox.py
+++ b/Lib/mailbox.py
@@ -14,14 +14,6 @@ class _Mailbox:
self.seekp = 0
self.factory = factory
- def seek(self, pos, whence=0):
- if whence==1: # Relative to current position
- self.pos = self.pos + pos
- if whence==2: # Relative to file's end
- self.pos = self.stop + pos
- else: # Default - absolute position
- self.pos = self.start + pos
-
def next(self):
while 1:
self.fp.seek(self.seekp)