diff options
| author | Raymond Hettinger <python@rcn.com> | 2002-06-30 03:39:14 +0000 |
|---|---|---|
| committer | Raymond Hettinger <python@rcn.com> | 2002-06-30 03:39:14 +0000 |
| commit | 46ac8eb3c899b498299a2f8fbcdd4ed3f32addba (patch) | |
| tree | bcbe8646fceabec7bcdc4c365f6389fb537fdb68 /Lib/mailbox.py | |
| parent | 78e057a32a92c3bfb464b27a02f4931c474769e8 (diff) | |
| download | cpython-git-46ac8eb3c899b498299a2f8fbcdd4ed3f32addba.tar.gz | |
Code modernization. Replace v=s[i]; del s[i] with single lookup v=s.pop(i)
Diffstat (limited to 'Lib/mailbox.py')
| -rwxr-xr-x | Lib/mailbox.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/mailbox.py b/Lib/mailbox.py index 7afff50012..1834177f70 100755 --- a/Lib/mailbox.py +++ b/Lib/mailbox.py @@ -202,8 +202,7 @@ class MHMailbox: def next(self): if not self.boxes: return None - fn = self.boxes[0] - del self.boxes[0] + fn = self.boxes.pop(0) fp = open(os.path.join(self.dirname, fn)) return self.factory(fp) @@ -233,8 +232,7 @@ class Maildir: def next(self): if not self.boxes: return None - fn = self.boxes[0] - del self.boxes[0] + fn = self.boxes.pop(0) fp = open(fn) return self.factory(fp) |
