]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
When the _iter_mixin stopped inheritting from UsserDictMixin, it lost the
authorNeal Norwitz <nnorwitz@gmail.com>
Sat, 1 Mar 2008 04:06:19 +0000 (04:06 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sat, 1 Mar 2008 04:06:19 +0000 (04:06 +0000)
__repr__ which caused bsddb.test.test_misc.py to fail in test03_repr_closed_db
Restore the repr so the test passes.  I think this is correct, but it would
be good to have some more review.

Lib/bsddb/__init__.py

index 939700ff20ebef92bbafdcbfd59aae36731bc28b..b2786d32e202a4ff335d46514424cc893ea859bd 100644 (file)
@@ -170,6 +170,9 @@ class _DBWithCursor(_iter_mixin):
     def __del__(self):
         self.close()
 
+    def __repr__(self):
+        return repr(dict(self.iteritems()))
+
     def _checkCursor(self):
         if self.dbc is None:
             self.dbc = _DeadlockWrap(self.db.cursor)