[Python-checkins] python/dist/src/Lib mailbox.py,1.40,1.41
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Fri Feb 6 21:16:27 EST 2004
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13831
Modified Files:
mailbox.py
Log Message:
Lists work better when popping from the right.
Index: mailbox.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/mailbox.py,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** mailbox.py 12 Sep 2002 05:08:00 -0000 1.40
--- mailbox.py 7 Feb 2004 02:16:24 -0000 1.41
***************
*** 200,203 ****
--- 200,204 ----
# before that str() added 'L':
self.boxes = map(str, list)
+ self.boxes.reverse()
self.factory = factory
***************
*** 208,212 ****
if not self.boxes:
return None
! fn = self.boxes.pop(0)
fp = open(os.path.join(self.dirname, fn))
msg = self.factory(fp)
--- 209,213 ----
if not self.boxes:
return None
! fn = self.boxes.pop()
fp = open(os.path.join(self.dirname, fn))
msg = self.factory(fp)
***************
*** 234,238 ****
boxes += [os.path.join(curdir, f)
for f in os.listdir(curdir) if f[0] != '.']
!
self.boxes = boxes
--- 235,239 ----
boxes += [os.path.join(curdir, f)
for f in os.listdir(curdir) if f[0] != '.']
! boxes.reverse()
self.boxes = boxes
***************
*** 243,247 ****
if not self.boxes:
return None
! fn = self.boxes.pop(0)
fp = open(fn)
return self.factory(fp)
--- 244,248 ----
if not self.boxes:
return None
! fn = self.boxes.pop()
fp = open(fn)
return self.factory(fp)
More information about the Python-checkins
mailing list