Kaydet (Commit) 2e9da602 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

The previous change works much faster (one lookup per key) when

iteritems() is defined.
üst 91dd19db
......@@ -154,6 +154,15 @@ class _DBWithCursor(UserDict.DictMixin):
except _bsddb.DBNotFoundError:
return
def iteritems(self):
try:
yield self.first()
next = self.next
while 1:
yield next()
except _bsddb.DBNotFoundError:
return
#----------------------------------------------------------------------
# Compatibility object factory functions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment