diff options
author | Guido van Rossum <guido@python.org> | 2007-02-12 00:22:55 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-02-12 00:22:55 (GMT) |
commit | dde4c2ca5694b1b53e4742962abcb1365126cbcd (patch) | |
tree | 0fbe1c2367cb4ea545bb4d915c26ce88bb4307f0 /Lib | |
parent | 8b8a543a7b007c0b743b0f02bd112760201c7cec (diff) | |
download | cpython-dde4c2ca5694b1b53e4742962abcb1365126cbcd.zip cpython-dde4c2ca5694b1b53e4742962abcb1365126cbcd.tar.gz cpython-dde4c2ca5694b1b53e4742962abcb1365126cbcd.tar.bz2 |
Fix another unit test.
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/mailbox.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/mailbox.py b/Lib/mailbox.py index d43f1dd..fde7132 100755 --- a/Lib/mailbox.py +++ b/Lib/mailbox.py @@ -95,7 +95,7 @@ class Mailbox: def keys(self): """Return a list of keys.""" - return list(self.keys()) + return list(self.iterkeys()) def itervalues(self): """Return an iterator over all messages.""" @@ -111,7 +111,7 @@ class Mailbox: def values(self): """Return a list of messages. Memory intensive.""" - return list(self.values()) + return list(self.itervalues()) def iteritems(self): """Return an iterator over (key, message) tuples.""" @@ -124,7 +124,7 @@ class Mailbox: def items(self): """Return a list of (key, message) tuples. Memory intensive.""" - return list(self.items()) + return list(self.iteritems()) def __contains__(self, key): """Return True if the keyed message exists, False otherwise.""" @@ -477,7 +477,7 @@ class Maildir(Mailbox): def next(self): """Return the next message in a one-time iteration.""" if not hasattr(self, '_onetime_keys'): - self._onetime_keys = self.keys() + self._onetime_keys = iter(self.keys()) while True: try: return self[self._onetime_keys.next()] |