After Nick's last message I went searching for "iteritems" in the docs. I
fixed a couple places (not yet checked in), but eventually came across
Mailbox.iteritems. Looking at the mailbox.py code, sure enough, it still
exists:
def iteritems(self):
"""Return an iterator over (key, message) tuples."""
for key in self.keys():
try:
value = self[key]
except KeyError:
continue
yield (key, value)
def items(self):
"""Return a list of (key, message) tuples. Memory intensive."""
return list(self.iteritems())
Should it be renamed items and the second def'n deleted? Same for iterkeys,
itervalues where they appear?
Skip
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com