diff --git a/Lib/bsddb/__init__.py b/Lib/bsddb/__init__.py index 5fc8a38508e..2910236b3d7 100644 --- a/Lib/bsddb/__init__.py +++ b/Lib/bsddb/__init__.py @@ -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